API Platform version(s) affected: 2.6.4 (regression from 2.6.3)
Description
(extracted from #4212)
The generated OpenAPI docs use the same schemas for content mime types application/json (and application/html) as for application/ld+json
How to reproduce
Default config, Dummy resource (id, name)
Possible Solution
After #4213, move both occurrences of
$schema = new Schema('openapi');
$schema->setDefinitions($schemas);
to inside respectively
foreach ($responseMimeTypes as $operationFormat) { and
foreach ($requestMimeTypes as $operationFormat) {
(just before each call to $this->jsonSchemaFactory->buildSchema(/*...*/))
Additional Context

(the bug is not in Swagger-UI but really in the generated docs.json)
API Platform version(s) affected: 2.6.4 (regression from 2.6.3)
Description
(extracted from #4212)
The generated OpenAPI docs use the same schemas for content mime types
application/json(andapplication/html) as forapplication/ld+jsonHow to reproduce
Default config, Dummy resource (id, name)
Possible Solution
After #4213, move both occurrences of
to inside respectively
foreach ($responseMimeTypes as $operationFormat) {andforeach ($requestMimeTypes as $operationFormat) {(just before each call to
$this->jsonSchemaFactory->buildSchema(/*...*/))Additional Context

(the bug is not in Swagger-UI but really in the generated docs.json)