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'}
Install with python:
Example code: