-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
OpenAPI schema generation is missing operationId properties #6542
Comments
Yep. On the list, but input there welcome too. (Both on operationId and title.) |
@carltongibson I am trying to look into the code to understand how I could experiment with the ID generation, and I was wondering: if |
It's not. 🙂 It's still in the files because A) it's being deprecated not removed instantly and B) I've not got to the cleanup phase where it might (say) get moved in a separate file. If you want to add this... If you just want to have a first go at that and open a PR, I'm happy to advise... 🙂 |
Closed by #6549 |
This issue occurs when using the updated OpenAPI schema generation by @carltongibson (#6532).
Most OpenAPI client tools, such as
apistar
oropenapi3
, require anoperationId
property to be able to perform requests. In the case of APIStar, if the operation ID is missing, a slugified title is used (code here); however thetitle
property seems to also be missing. For those reasons, opening a generated schema with a client will show zero available endpoints.Checklist
master
branch of Django REST framework.Steps to reproduce
Run
./manage.py generateschema
on any project that has an API endpoint, then load the generated YAML schema with a client library such as API Star:APIStar will state that the schema is valid, because
operationId
is not required but recommended, but it will be empty.Expected behavior
An OpenAPI schema with
operationId
properties to give a name to each endpoint. It seems the renderer on 3.9/master did set the property.Actual behavior
Each path in the schema is missing a name, description, or any kind of identifier that could be used by client libraries.
The text was updated successfully, but these errors were encountered: