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(openapi): Yaml openapi export should have numeric keys as string #6436

Closed DartCZ closed 2 days ago

DartCZ commented 2 days ago

Description

The OpenAPI specification mandates that all keys in the Responses Object be strings, as outlined here: https://github.com/OAI/OpenAPI-Specification/blob/157a4c81ae537ef793b2bee368bc00d88b461de8/versions/3.0.2.md#patterned-fields-1.

This requirement includes values like '200', which PHP typecasts to integers. Therefore, Yaml should also adhere to this rule.

soyuka commented 2 days ago

thanks!