spot icon indicating copy to clipboard operation
spot copied to clipboard

Generate OpenAPI with various API formats (JSON:API, HAL, JSON-LD)

Open estahn opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? Please describe.

We're implementing JSON:API across our API's. It would be great to use spot and to define in which format this should be converted, possibly multiple formats.

https://api-platform.com/docs/core/content-negotiation/#content-negotiation

Describe the solution you'd like

Leave spots contract description and model as is. The OpenAPI spec will be generated based on a specified format.

estahn avatar Oct 16 '20 00:10 estahn

Hi @estahn, just to clarify are you after the ability to set the media type globally? (i.e. change all application/json to application/vnd.api+json) Or are you after the ability to set multiple different media types for your endpoints?

lfportal avatar Oct 20 '20 10:10 lfportal

@lfportal Ideally multiple, but I'm ok with having a single format.

estahn avatar Oct 22 '20 04:10 estahn