Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix openapi spec in quickstart doc #1922

Merged
merged 1 commit into from
May 19, 2024
Merged

Fix openapi spec in quickstart doc #1922

merged 1 commit into from
May 19, 2024

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
8 checks passed
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