-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add collection notes endpoint #444
Conversation
process/views.py
Outdated
@action(detail=True) | ||
def notes(self, request, pk=None): | ||
"""Return the notes for the compiled collection and its parent collection.""" | ||
compiled_collection = get_object_or_404(Collection, pk=pk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why request the compiled collection? I think it'd be more generic to request the root collection, and then get notes from all child collections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the same approach as the metadata endpoint, as I thought the registry would probably ask for the compiled collection. But you are right and I will change it to the root collection instead
@@ -232,6 +232,21 @@ def metadata(self, request, pk=None): | |||
|
|||
return Response(metadata) | |||
|
|||
@action(detail=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other views use @extend_schema
to define the output format. This is only to improve the OpenAPI docs. You can create a follow-up issue instead.
…ngfisher-process into 443-collection-notes
closes #443