drf-openapi-tester
drf-openapi-tester copied to clipboard
Support for application/vnd.api+json content type in responses
We use application/vnd.api+json content type for endpoint responses. Currently getting the error below when running tests:
File "../python3.9/site-packages/openapi_tester/schema_tester.py", line 92, in get_key_value
raise UndocumentedSchemaSectionError(
openapi_tester.exceptions.UndocumentedSchemaSectionError: Error: Unsuccessfully tried to index the OpenAPI schema by `application/json`.
No `application/json` responses documented for method: get, path: /api/#####/
Ah ok yes this is probably not accounted for. Would you be interested in creating a fix?
Is this no longer an issue for you @darduf? 🙂
Is this no longer an issue for you @darduf? 🙂
This is still an issue for us as we use content type application/vnd.api+json. I will try to get a PR in for this also. I think we can use regex here again to allow for either content types.
application/vnd.api+json or application/json