api-platform / core

The server component of API Platform: hypermedia and GraphQL APIs in minutes
https://api-platform.com
MIT License
2.38k stars 846 forks source link

fix(metadata): wrong schema generated if openapicontext set on array #6431

Closed monitaurus closed 2 days ago

monitaurus commented 1 week ago
Q A
Branch? 3.2
Tickets Closes https://github.com/api-platform/core/issues/6391
License MIT
Doc PR none

On a calculated field that returns an array, if we add a ApiProperty to change the type into object, the generated OpenAPI does generate a "type": "object" but there is also an extra "items": {"type": "string"}.

monitaurus commented 1 week ago

I don't know if they're needed, but I created new test to cover this bug resolution.

monitaurus commented 1 week ago

There's three failing checks, unfortunately I don't know how to fix them, nor if they're linked to this PR.

soyuka commented 2 days ago

looks perfect, thanks!