api-doc-parser icon indicating copy to clipboard operation
api-doc-parser copied to clipboard

Why aren't hydra and openapi3 generating the same components

Open aymaneabssi opened this issue 3 years ago • 1 comments

Description here I am testing the client generator and I am noticing that the hydra generates only this `Interface for the "Book" resource type has been generated!

Interface for the "Review" resource type has been generated!

Interface for the "TopBook" resource type has been generated!`

and the openapi3 generate this: `Interface for the "Book" resource type has been generated!;

Interface for the "Parchment" resource type has been generated!;

Interface for the "Review" resource type has been generated!;

Interface for the "TopBook" resource type has been generated!; `

and when i looked at the endpoints on the api https://demo.api-platform.com/ i saw that there are 5 /books* /parchments* // deprecated /reviews* /stats* /top_books*

How to reproduce I lunched the test-gen and test-gen-openapi3 commands

aymaneabssi avatar Oct 20 '22 10:10 aymaneabssi

Deprecated resources are filtered by default: https://github.com/api-platform/create-client/blob/d791b8e316916a3e9db8005d08d090fd04b00c4f/src/index.js#L123 However the api-doc-parser should be able to mark the Parchment resource as deprecated as well: https://github.com/api-platform/api-doc-parser/blob/895cd81e4208c8c70a7383f65cefc31f1706c353/src/openapi3/handleJson.ts#L124 Transfering this issue to api-doc-parser. To investigate.

alanpoulain avatar Oct 20 '22 15:10 alanpoulain