Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swagger UI support in JPA Server #12

Open
rehammuzzamil opened this issue Oct 22, 2021 · 0 comments
Open

Add swagger UI support in JPA Server #12

rehammuzzamil opened this issue Oct 22, 2021 · 0 comments

Comments

@rehammuzzamil
Copy link

rehammuzzamil commented Oct 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant