According to the OpenAPI Spec, OpenAPI Extensions are allowed to be under responses. But when loading the spec via load.Spec(), the response codes are completely ignored if there is an extension. If there is no extension, then the response codes are parsed and hydrated just fine.
Problem statement
According to the OpenAPI Spec, OpenAPI Extensions are allowed to be under
responses
. But when loading the spec via load.Spec(), the response codes are completely ignored if there is an extension. If there is no extension, then the response codes are parsed and hydrated just fine.OpenAPI specification
OpenAPI Extensions
Steps to reproduce
Spec file (spec.json)
Code:
Output:
But when you remove the
"x-ext-resp": "response ext"
, it ends up dumping the following:Environment
swagger version:latest dev go version: 1.19.1 OS: Mac