I am attempting to generate Flask code, using Connexion, from a .yaml file containing OpenAPI 3.0.0 specifications.
When I execute this:
I get
import connexion
app = connexion.App(__name__, specification_dir='swagger/')
app.add_api('Contato.yaml')
app.run(port=8080)
and I get this exception:
connexion.exceptions.InvalidSpecification: {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Contato', 'x-scope': ['']}}}} is not valid under any of the given schemas
Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^/']['properties']['get']['properties']['responses']['patternProperties']['^([0-9X]{3})$']:
{'oneOf': [{'$ref': '#/definitions/response'},
{'$ref': '#/definitions/reference'}]}
On instance['paths']['/{idContato}']['get']['responses']['200']:
{'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Contato',
'x-scope': ['']}}}}
The .yaml file does not include 'x-scope'. Where is this definition coming from? How can I overcome this exception?