GeoscienceAustralia / strat-ontology-graph-API

1 stars 5 forks source link

Correct API file to use integer as its own type as per OpenAPI spec #19

Open vjf opened 3 years ago

vjf commented 3 years ago

The 'openapi.yaml' file needs fixing because specifying a format of 'integer' with type of 'number' causes this error:

Traceback (most recent call last): File "./app.py", line 14, in app.add_api('openapi.yaml', resolver=RestyResolver('api')) File "/usr/local/lib/python3.6/site-packages/connexion/apps/flask_app.py", line 57, in add_api api = super(FlaskApp, self).add_api(specification, **kwargs) File "/usr/local/lib/python3.6/site-packages/connexion/apps/abstract.py", line 156, in add_api options=api_options.as_dict()) File "/usr/local/lib/python3.6/site-packages/connexion/apis/abstract.py", line 75, in init self.specification = Specification.load(specification, arguments=arguments) File "/usr/local/lib/python3.6/site-packages/connexion/spec.py", line 153, in load return cls.from_file(spec, arguments=arguments) File "/usr/local/lib/python3.6/site-packages/connexion/spec.py", line 107, in from_file return cls.from_dict(spec) File "/usr/local/lib/python3.6/site-packages/connexion/spec.py", line 145, in from_dict return OpenAPISpecification(spec) File "/usr/local/lib/python3.6/site-packages/connexion/spec.py", line 38, in init self._validate_spec(raw_spec) File "/usr/local/lib/python3.6/site-packages/connexion/spec.py", line 239, in _validate_spec raise InvalidSpecification.create_from(e) connexion.exceptions.InvalidSpecification: Format checker for 'integer' format not found

Failed validating 'format' in schema: {'default': 1000, 'format': 'integer', 'nullable': False, 'type': 'number'}

On instance: 1000