Invalid swagger - duplicated query parameters
Hello, I've tried to generate a swagger with the following command (latest clone)
fhir-swagger --fhir_url "http://test.fhir.org/r4" --conformance_path="/metadata?_format=application/json" --r4 --output swagger.json
The generated swagger.json contains errors:
Validation failed. /paths/Account/get has duplicate parameters Validation failed. Found multiple query parameters named _filter
Exploring the json - it looks like all the underscore parameters are duplicated. What am I doing wrong? Thx
This could easily be a bug on our end as well, or something specific to your FHIR spec - happy to accept a PR that fixes this!
As much as I understand the server side on R4 contains duplications in the metadata. On the tool side there is no validation on this .push() so it ends up at duplication.
On the other hand I found out there is active topic on the official fhir chat about openAPI tooling and it seems the community is also working on this... Might would be interesting to join the efforts.
I too faced a similar problem where there were duplications on metadata so till we find a perfect validation for removing in the metadata adding a check here will help others like myself. Will raise PR shortly with my fix.