You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vars openapi3.Specspec:=`openapi: 3.0.3info: description: description license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: title version: 2.0.0servers: - url: /v2paths: /user: put: summary: updates the user by id operationId: UpdateUser requestBody: content: application/json: schema: type: string description: Updated user object required: true responses: "404": description: User not foundcomponents: securitySchemes: api_key: in: header name: x-api-key type: apiKey bearer_auth: type: http scheme: bearer bearerFormat: JWT`iferr:=s.UnmarshalYAML([]byte(spec)); err!=nil {
log.Fatal(err)
}
this results in:
oneOf constraint failed for SecuritySchemeOrRef with 0 valid results: map[SecurityScheme:oneOf constraint failed for SecurityScheme with 0 valid results: map[APIKeySecurityScheme:required key missing: name HTTPSecurityScheme:oneOf constraint failed for HTTPSecurityScheme with 2 valid results: map[] OAuth2SecurityScheme:required key missing: flows OpenIDConnectSecurityScheme:required key missing: openIdConnectUrl] SecuritySchemeReference:required key missing: $ref]
when there really shouldn't be any error. It's coming from the generated openapi3/entities.go but when I use the source json schema directly it gives no errors as it should, so I there must be something wrong with the generated validation code
Version: v0.2.24
The text was updated successfully, but these errors were encountered:
Consider something like:
this results in:
when there really shouldn't be any error. It's coming from the generated
openapi3/entities.go
but when I use the source json schema directly it gives no errors as it should, so I there must be something wrong with the generated validation codeVersion: v0.2.24
The text was updated successfully, but these errors were encountered: