Closed LarsvdBrandt closed 5 months ago
Thanks for reporting this @LarsvdBrandt.
I can reproduce this with your example and will try to see what goes wrong.
There was indeed an issue in our models, and we have now fixed it. However, I was still not able to successfully create a bravado
client from our specification, but instead got an error about:
Error creating SwaggerClient: Duplicate "Aggregations" model found at "http://localhost:8000/fairdi/nomad/latest/api/v1/openapi.json#/components/schemas/MetadataResponse/properties/aggregations". Original "Aggregations" model at "http://localhost:8000/fairdi/nomad/latest/api/v1/openapi.json#/components/schemas/Metadata/properties/aggregations"
I'm not sure what exactly causes this: these models are definitely different pydantic
classes in our codebase. The issue could also be in bravado
itself: it has not seen updates in three years, and it seems to only support OpenAPI v2, whereas we are currently using OpenAPI v3. If you can reproduce this issue with an OpenAPI v3 compatible client, then I think we could investigate further.
Please re-open this issue if there are still problems with OpenAPI v3 compatible Python clients, closing for now.
I have an issue with NOMAD Oasis.
When creating a swagger client from bravado through a python script, I get an error because of an unresolved JSON pointer: : 'components/schemas/DatasetResponse'.
I checked the schema, and could not find DatasetResponse in there, but there was a reference to it.
Error: DEBUG:swagger_spec_validator.ref_validators:Attaching x-scope to {'$ref': '#/components/schemas/DatasetResponse'} ERROR:main:Error creating SwaggerClient: Unresolvable JSON pointer: 'components/schemas/DatasetResponse'
Code: