-
Notifications
You must be signed in to change notification settings - Fork 3k
feat: ROOT-64: fully generated schema #7988
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
Conversation
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-playground canceled.
|
✅ Deploy Preview for label-studio-storybook canceled.
|
/git merge develop
|
@@ -259,6 +259,30 @@ def paginate_queryset(self, queryset, request, view=None): | |||
return self.paginate_totals_queryset(queryset, request, view) | |||
return self.sync_paginate_queryset(queryset, request, view) | |||
|
|||
def get_paginated_response_schema(self, schema): |
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.
what is the schema passed into here exactly?
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.
It's used by Spectacular and then Fern to describe the pagination behavior at this endpoint (in particular, that the field containing the list of tasks is called tasks
rather than results
)
'x-fern-header': { | ||
'name': 'api_key', | ||
'env': 'LABEL_STUDIO_API_KEY', | ||
'prefix': 'Token ', |
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.
One thing I never figured out is...
api_key param supports both legacy token, and jwt. The docs specify -H "Authorization: Token [your-token]" but it needs to be Bearer
when using jwt. Confusing for users. Not sure if there is a clean way to show both
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 think we could figure this out, but I wanted to keep consistent with what we had before for this initial version
extensions={ | ||
'x-fern-sdk-group-name': 'jwt_settings', | ||
'x-fern-sdk-method-name': 'update', | ||
'x-fern-audiences': ['public'], |
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.
when do we use non-public audiences? just curious. and is there a default if we dont specify?
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.
We have a few endpoints that are marked 'internal'
and these don't show up in fern. In practice, this is the same as not applying the fern extensions at all.
/git merge develop
|
@@ -144,7 +144,27 @@ def get_queryset(self): | |||
tags=['Webhooks'], | |||
summary='Get all webhook actions', | |||
description='Get descriptions of all available webhook actions to set up webhooks.', | |||
responses={'200': 'Object with description data.'}, | |||
responses={ |
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.
Same reason for not adding a serializer here as in ml/api.py
?
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.
merged before I saw this - actually this one's slightly different, in that it's not super easy (as far as I know) to programmatically generate a serializer. The response from this endpoint is a bit weird.
This PR was automatically generated via Follow Merge. Workflow Run
Please ensure that all linked upstream Pull Requests are merged before proceeding with this one.