Hello,

We are trying to setup a new REST service using the international FHIR 
standard (*Fast Health Interoperability Resources*).
More info on this: https://www.hl7.org/fhir/

However when integrating this into a swagger, we are not able to view the 
JSON structures in the UI.

Our concrete example:
swagger: '2.0'
info:
  version: v1.0
  title: API FHIR Consent
basePath: /Consent
consumes:
  - application/json+fhir
produces:
  - application/json+fhir
paths:
  /:
    get:
      tags:
        - Consent
      summary: 'Retrieve a patient consent'
      operationId: getConsent
      parameters:
        - name: patient
          in: query
          description: The identifier of the patient
          required: true
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          schema:
            title: Consent
            type: object
            items:
              $ref: '#/definitions/Consent'
        '403':
          description: Forbidden
        '404':
          description: NotFound
      deprecated: false
 
definitions:
  Consent:
    {
           $ref: https://www.hl7.org/fhir/Consent.schema.json 
    }

To make this work through the browser, we disabled CORS verification with a 
plugin.
The following issue is the $refs used in the original schema here above (
https://www.hl7.org/fhir/Consent.schema.json), are sometimes dangling 
references. I will contact HL7 for this issue.
We then copied the complete JSON schema set in local (also available here 
as a zip https://www.hl7.org/fhir/downloads.html or directly here 
https://www.hl7.org/fhir/fhir.schema.json.zip), corrected these issues and 
made these files available via a Mongoose HTTP server.
But even then, I am not able to visualize anything in the Swagger UI.

What is exactly the problem with these schemas?
Is the problem lying within FHIR or is there an issue with the swagger UI?

Tia for any help!

<https://lh3.googleusercontent.com/-Ecg1lv_cqK4/WQM3_kl6TcI/AAAAAAAABJo/8DuwUIw9jgcReLEsJic_nXtIUJU1f5WhwCLcB/s1600/2017-04-28%2B14_32_10-Swagger%2BEditor.png>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to