Skip to content

Add swagger UI support in JPA Server #12

Open
@rehammuzzamil

Description

@rehammuzzamil

Swagger UI support can be provided in JPA Server by adding the following dependency:

<dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-server-openapi</artifactId>
        <version>5.4.0-PRE10-SNAPSHOT</version>
    </dependency>

The next step would be to register the interceptor in our JPA Restful server class.

OpenApiInterceptor openApiInterceptor = new OpenApiInterceptor();
registerInterceptor(openApiInterceptor);

The releases for the hapi-fhir-server-openapi is in Maven here: https://oss.sonatype.org/content/repositories/snapshots/ca/uhn/hapi/fhir/hapi-fhir-server-openapi/

Once dependency is added, a UI similar to this can be accessed after successful login through the Keycloak Login Form.

swagger ui

https://hapi.fhir.org/baseR4/swagger-ui/

Issue:
Swagger UI won't have documentation for the extension of resource providers like LocationHierarchy.
We need to add or manipulate this after RnD.

For Reference:
https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html

As discussed we can pick this issue later on.
cc: @f-odhiambo @dubdabasoduba @kwasim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions