FHIR Chat · Swagger and IG · IG creation

Stream: IG creation

Topic: Swagger and IG


view this post on Zulip Kevin Mayfield (Dec 07 2019 at 12:11):

I'm exploring this at the moment and have openapi being created from CapabilityStatements.

I'm trying to get swagger to work with this (in IG) but running into problems with the schema references. e.g.

"application/fhir+xml": {
"schema": {
"$ref": "https://build.fhir.org/Bundle.xsd"
}
}

When I try to expand the api's the request to get the reference is blocked (cors). Any suggestions on working around this? (Think I should put the xsd in my IG and change the references)

view this post on Zulip Eric Haas (Dec 07 2019 at 16:32):

When you say

I'm trying to get swagger to work with this (in IG) but running into problems with the schema references. e.g.

Do you mean an inline swagger UI or codegen tooling. I've been meaning to look into that?

view this post on Zulip Kevin Mayfield (Dec 07 2019 at 19:00):

Have got it working now.
I'm running swagger inside the ImplementationGuide.
What I've done is remove the schema elements all the schema elements.
"schema": {
"$ref": "https://build.fhir.org/Bundle.xsd"
}

Think this is two issues. When the Capability Statement supports xml, the XSD entries e.g. https://build.fhir.org/Bundle.xsd cause 404 (and cors) errors.
The json entries resolve but cause swagger to hang, have tried swagger-ui 3.23.11 and 3.24.3

view this post on Zulip Grahame Grieve (Dec 09 2019 at 12:20):

what version of FHIR is this for?


Last updated: Apr 12 2022 at 19:14 UTC