OpenAPI

Firely Server is capable of generating Swagger / OpenAPI documentation. The content of these definitional artifacts are based on a CapabilityStatement. A full overview of the REST API provided by Firely Server can be found here: OpenAPI documentation. Please note that due to the feature-richness of the CapabilityStatement resource, it is not possible to expose all information through the OpenAPI documents and some limitations exist.

Limitations of Capability Statement to OpenAPI mapping

  • Resource profile definition references are not displayed.

  • Field profile definition references are not displayed.

  • Supported interactions are not displayed.

    • i.e. searchInclude, searchRevInclude

  • Supported interactions are not directly listed, but are inferred from the output.

    • i.e. GET {BASE_URL}/Appointment/{logical_id}/_history infers readhistory is permitted.

Generating OpenAPI for a local instance of Firely Server

OpenAPI documents can be generated for a local instance of Firely Server using the open source github repository Microsoft/Fhir-CodeGen.

A sample configuration is listed below:

fhir-codegen-cli
        --fhir-server-url <FhirServerUrl>
        --resolve-external false
        --language-options "OpenApi|SingleResponses=false|Metadata=true|SchemaLevel=names|MultiFile=true"
        --output-path <OpenApiOutputDirectory>
        --language OpenApi

See Microsoft’s documentation for other configuration options and usage details.