jhthorsen / mojolicious-plugin-openapi

OpenAPI / Swagger plugin for Mojolicious
54 stars 44 forks source link

OAS3 path fields "servers", "summary" #214

Closed myrrhlin closed 3 years ago

myrrhlin commented 3 years ago

the OAS3 spec permits fields on paths such as "summary" and "servers" (also "description"): https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#pathsObject

but JSON::Validator::Schema::OpenAPIv3 dies in add_default_response if the schema contains these fields, because it inherits the JSON::Validator::Schema::OpenAPIv2 routes method which doesn't expect a path to have these fields, and treats them as methods.

jhthorsen commented 3 years ago

The fix in J::V will be released later today.