Closed bjornharrtell closed 7 years ago
While it would be good to auto wire this somehow, at least it seems possible to use SwaggerResponseAttribute and SwaggerSchemaFilterAttribute to correctly instruct Swashbuckle.
I've had success implementing special purpose IDocumentFilter
and IOperationFilter
which could be packaged into a ISwaggerProvider
for a more or less generic solution to auto wire support for JSON API with Swashbuckle. The latter would require further non-trivial work.
A caveat is that it's not possible to ref/extend to the JSON API JSON Schema as Swagger 2.0 does not support enough of JSON Schema. This seems to be changing in Swagger 3.0 but it's far off to be generally available. I still think Swagger 2.0 can be useful as documentation for JSON API, you just have to leave out some details which can be referred to the actual JSON API spec at relevant places.
I think this was solved with #142.
As Swashbuckle will try to guess the schema for the plain entity types it will not expose a swagger documentation for the actual JSON API as exposed by Saule.
It would be nice to somehow make Swashbuckle understand that what is really input/output in the REST API is ApiResources, without customizing the Swashbuckle Config.