Improving OpenAPI spec generation: automatically adding links and non-successful response codes #9114
Unanswered
shermari
asked this question in
Ideas & Suggestions
Replies: 1 comment 1 reply
-
using https://drf-spectacular.readthedocs.io/en/latest/ would be recommended instead of using the built in one for OpenAPI. you can try it instead. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We've been using DRF for quite some time now and it's been great to use it.
We rely heavily on the OpenAPI specification that's generated (https://www.django-rest-framework.org/community/3.10-announcement/#openapi-schema-generation). Our front end applications consume the OpenAPI spec in order to interact with our DRF back end. This is all working as expected.
Lately though, we've been investing in test-automation and found the OpenAPI spec to be a great source for automatically generating test-scenario's. However, we noticed that DRF's current implementation of the OpenAPI spec seems to have some limitations that keep us from fully leveraging its potential for test-automation.
We notice 2 missing parts in the OpenAPI spec generated by DRF, that would benefit test-automation and improve the OpenAPI spec in general:
We'd like to know if 1. automatically adding links and 2. automatically adding non-successful response codes to the OpenAPI spec is currently supported.
If not, we'd like to raise a feature request, since this doesn't add a new feature DRF (which is considered feature complete) but simply improves an existing feature by generating a more complete OpenAPI spec, that follows what OpenAPI 3.x already offers.
Environment information:
python version: 3.9.6
drf version: 3.12.4
django version: 3.1.7
schemathesis version:3.19.6
OS: Mac OS Monterey, 12.0.1
Beta Was this translation helpful? Give feedback.
All reactions