api-platform / api-doc-parser

Transforms a Hydra API doc in an intermediate representation that can be used for various tasks such as creating smart API clients, scaffolding code or building administration interfaces.
MIT License
104 stars 71 forks source link

feat: improve OpenAPI support #108

Closed alanpoulain closed 2 years ago

alanpoulain commented 2 years ago
Q A
Branch? main
Tickets Fixes #37, fixes #89, fixes #101
License MIT
Doc PR N/A

Supersedes https://github.com/api-platform/api-doc-parser/pull/94. Thank you very much @simonhildebrandt for having started the work!

This PR largely expands the OpenAPI 3 support: it should now be equivalent to the Hydra one.

In order to do this, the library makes a lot of assumptions, documented in the README.md file.

A new type property has been introduced in addition to the range property (very specific to Hydra).

Note that the Swagger (OpenAPI 2) has been improved a little, but not as much as OpenAPI 3.