-
-
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 generator is not production ready #7205
Comments
I searched deeper and I foud that empty list in edit: |
class CitiesSerializer(serializers.ListSerializer):
child = serializers.CharField(read_only=True, allow_null=False) schema.json: "/api/core/cities/": {
"get": {
"operationId": "listCities",
"description": "",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {}
}
}
},
"description": ""
}
}
}
}, |
Hi @Behoston. Sorry it’s not up to your standards. It is open source, and built with volunteer effort, so there’s a easy way to improve it. The schema generation is very young in contrast to the rest of the code. It’s coming on nicely, with some fixes, tags, components,... targeted for the next release. You say not production ready. I say maturing nicely. 🤷♂️ I don’t think, even with **’s replacing expletives, that the tone of your comment is appropriate, so I would ask you to moderate that. Thanks. 👍 Very happy to see issue reports. That’s the best way to fill in the gaps. |
Looking at the individual issues, except Security schemes — which is a bigger change, but for now you can subclass SchemaGenerator to add — they all should be addressable. PRs very welcome!
Yes. Ideally we'd map the response code from the mixins (and viewset actions) That would be a nice addition. Individual tickets would be better — not least because people see them and can take them on. I'll leave this open as it is so we don't loose track but, if you have time to create the separate tickets that would be good. |
Ok, I'll try. |
Super. Happy to comment on PRs if you want input and open them early. |
i'm new to django, i tried running this command: python manage.py generateschema > openapi-schema.yml
TypeError: Post() got unexpected keyword arguments: 'context' |
I have general issue with Open API schema generator, it looks like someone wants too hard to deliver this. I decided to create one issue for all problems and not use template - sorry.
required: []
→In most cases, schema is invalid or not representing actual API. I think, you should revert this feature, fix all issues, add some tests then release it again. Other source code in DRF is top quality, but this part looks/works bad :/
The text was updated successfully, but these errors were encountered: