REST endpoints using the Swagger UI page

Hi,
Please how can I access the swagger document for my local rest services?

I am already aware of this Swagger UI but I need the local equivalent for my jmix application.

rest-api-addon-on is already enabled for my application.

Thanks

You need Project-specific OpenAPI Documentation.

You can see it in Swagger UI if you enable public access to this endpoint:

jmix.rest.anonymous-url-patterns = /rest/docs/*

Then just put the local URL into the Swagger UI field on the top:
image

1 Like

Hi Konstantin,
Thanks very much. It works.

Best regards

isn’t there a way to display the project-specific swagger page? are we obliged to enter a url in this page?

How about this ?. Is there any way to display project-specific swagger page instead of use docs.jmix.io ?
Thnks,

Jmix application does not provide a UI for OpenAPI.

You can either use the UI page at https://docs.jmix.io/openapi/2.2/ or get the content from the /rest/docs/openapiDetailed.json endpoint and paste it into https://editor-next.swagger.io/.

Just ported it into my application :slight_smile:

Should I make a jmix add-on out of it?

Image

Yea… currently it’s only readable in light mode ;(

We have an issue for this: Provide built-in visualization of OpenAPI schema · Issue #3484 · jmix-framework/jmix

But most probably we’ll just explain in the documentation how to integrate Springdoc, both for generic and custom endpoints.

Published Add-on → currently in review → maybe it will come to the Marketplace :slight_smile:

Gamer08YT/jmix-swagger-ui-addon