Skip to content

Fix openapi spec in quickstart doc#1922

Merged
Ruwann merged 1 commit intospec-first:mainfrom
psegedy:patch-1
May 19, 2024
Merged

Fix openapi spec in quickstart doc#1922
Ruwann merged 1 commit intospec-first:mainfrom
psegedy:patch-1

Conversation

@psegedy
Copy link
Contributor

@psegedy psegedy commented May 6, 2024

Using openapi spec from quickstart results in

connexion.exceptions.InvalidSpecification: {'content': {'text/plain': {'schema': {'type': 'string'}}}} is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^\\/']['patternProperties']['^(get|put|post|delete|options|head|patch|trace)$']['properties']['responses']['patternProperties']['^[1-5](?:\\d{2}|XX)$']:
    {'oneOf': [{'$ref': '#/definitions/Response'},
               {'$ref': '#/definitions/Reference'}]}

On instance['paths']['/greeting/{name}']['get']['responses']['200']:
    {'content': {'text/plain': {'schema': {'type': 'string'}}}}  

because description is missing in the spec and it is a required property for #/definitions/Response. https://github.com/spec-first/connexion/blob/main/connexion/resources/schemas/v3.0/schema.json#L596-L602

`description` is a required property for `#/definitions/Response`
Copy link
Member

@Ruwann Ruwann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, @psegedy !

@coveralls
Copy link

Coverage Status

coverage: 94.197%. remained the same
when pulling 2f2f5cb on psegedy:patch-1
into fcfe151 on spec-first:main.

@Ruwann Ruwann merged commit 562fff0 into spec-first:main May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants