Generate OpenAPI spec and changelog.xml files?

Hi all,

I am building custom extension for Keycloak where I need to communicate with Database, and to expose REST APIs as well.
How can I generate OpenAPI spec file and how to generate changelog.xml for extension?
I tried to find the documentation for this, but without any luck.

Documentation from Keycloak on building extensions:

Also an example of one of our extensions that does both:

Thank you very much for sharing the docs and the project, however I can not find a guide for generating changelog.xml files, same goes for generating openapi yaml file. Do you have perhpas some documents on those topics? Thanks!

There is nothing specific to Keycloak to generate changelog files. It uses Liquibase, which has some functions for generating those from the state of your database. See the documentation there (generate-changelog) and consult the Liquibase forums for help.

1 Like

Thank you a milion. What about generating the rest open api documentation, is there any guide for that?