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

Fails to build with openapi-core #69

Open
phalt opened this issue Jul 31, 2023 · 0 comments
Open

Fails to build with openapi-core #69

phalt opened this issue Jul 31, 2023 · 0 comments

Comments

@phalt
Copy link

phalt commented Jul 31, 2023

Install with python:

pip install openapi-core==0.18.0

Example code:

with open(file, "r") as f:
    spec = Spec.from_file(f)
File "/home/.venv/lib/python3.11/site-packages/openapi_core/spec/paths.py", line 27, in from_dict
    validator.validate(data, base_uri=base_uri, spec_url=spec_url)
  File "/home/.venv/lib/python3.11/site-packages/openapi_spec_validator/validation/proxies.py", line 34, in validate
    raise err
openapi_spec_validator.validation.exceptions.OpenAPIValidationError: {'type': 'string', 'description': 'The symbol of the faction.', 'minLength': 1, 'enum': ['COSMIC', 'VOID', 'GALACTIC', 'QUANTUM', 'DOMINION', 'ASTRO', 'CORSAIRS', 'OBSIDIAN', 'AEGIS', 'UNITED', 'SOLITARY', 'COBALT', 'OMEGA', 'ECHO', 'LORDS', 'CULT', 'ANCIENTS', 'SHADOW', 'ETHEREAL'], 'examples': ['COSMIC']} is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['components']['properties']['schemas']['patternProperties']['^[a-zA-Z0-9\\.\\-_]+$']:
    {'oneOf': [{'$ref': '#/definitions/Schema'},
               {'$ref': '#/definitions/Reference'}]}

On instance['components']['schemas']['FactionSymbols']:
    {'description': 'The symbol of the faction.',
     'enum': ['COSMIC',
              'VOID',
              'GALACTIC',
              'QUANTUM',
              'DOMINION',
              'ASTRO',
              'CORSAIRS',
              'OBSIDIAN',
              'AEGIS',
              'UNITED',
              'SOLITARY',
              'COBALT',
              'OMEGA',
              'ECHO',
              'LORDS',
              'CULT',
              'ANCIENTS',
              'SHADOW',
              'ETHEREAL'],
     'examples': ['COSMIC'],
     'minLength': 1,
     'type': 'string'}
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

No branches or pull requests

1 participant