Cristi Vîjdea
Cristi Vîjdea
It seems that the default DRF docs also ignore OPTIONS endpoints, so this feature (explicitly including decorated endpoints) will be a bit harder to implement.
> How would you add compatibility between the two libraries? > > I co-maintain Artory/drf-hal-json, so we could add the inspectors there? I'm not generally opposed to adding third-party specific...
I don't quite understand. The response of an operation must be an [OpenAPI response object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#responseObject) with or without a Schema object describing its structure. To achieve this you can either...
I don't, really. You don't put a response dictionary into an API schema specification, you describe the structure of that dictionary. You might be looking to set the ``examples`` field...
I don't see the point. You could just generate an openapi.Schema object instead of a serializer.
Then I suppose this could be solved by recursively converting ``Serializer`` objects to ``Schema`` objects wherever a ``Schema`` is expected?
Assuming you configured drf-json-api as outlined [here](https://django-rest-framework-json-api.readthedocs.io/en/stable/usage.html#configuration), you could probably get it done by modifying the response using a PaginatorInspector as described [here](https://drf-yasg.readthedocs.io/en/stable/custom_spec.html#inspector-classes). Otherwise, for a more general implementation you...
I'm not sure I see how the two specs relate. JSON API is a way of structuring JSON bodies of HTTP requests and responses of an API, while Swagger is...
Hello. The swagger model DRF serializer mapping is one-to-one. ``readOnly`` fields are detected from the serializer fields. OpenAPI 2 does not support ``writeOnly`` fields (OpenAPI 3 does), so those are...
Okay, I see your point. I still don't think that would be reasonable default behaviour, but I could see its utility as a feature enabed by a setting or class...