# Generate OpenAPI spec and changelog.xml files?

**URL:** <https://forum.keycloak.org/t/generate-openapi-spec-and-changelog-xml-files/25771>\
**Category:** Getting advice\
**Created:** [April 29, 2024, 9:13am UTC](https://forum.keycloak.org/t/generate-openapi-spec-and-changelog-xml-files/25771 "2024-04-29T09:13:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marko](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@marko](https://forum.keycloak.org/u/marko)\
**Post date:** [April 29, 2024, 9:13am UTC](https://forum.keycloak.org/t/generate-openapi-spec-and-changelog-xml-files/25771/1 "2024-04-29T09:13:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [April 30, 2024, 10:27am UTC](https://forum.keycloak.org/t/generate-openapi-spec-and-changelog-xml-files/25771/2 "2024-04-30T10:27:47Z")

</div>

Documentation from Keycloak on building extensions:

- JPA [Server Developer Guide](https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_jpa)
- REST [Server Developer Guide](https://www.keycloak.org/docs/latest/server_development/index.html#_extensions_rest)

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

> **[GitHub - p2-inc/keycloak-orgs: Single realm, multi-tenancy for SaaS apps](https://github.com/p2-inc/keycloak-orgs)**
>
> Single realm, multi-tenancy for SaaS apps. Contribute to p2-inc/keycloak-orgs development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![marko](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@marko](https://forum.keycloak.org/u/marko)\
**Post date:** [April 30, 2024, 12:13pm UTC](https://forum.keycloak.org/t/generate-openapi-spec-and-changelog-xml-files/25771/3 "2024-04-30T12:13:37Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [April 30, 2024, 3:59pm UTC](https://forum.keycloak.org/t/generate-openapi-spec-and-changelog-xml-files/25771/4 "2024-04-30T15:59:22Z")

</div>

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](https://docs.liquibase.com/commands/inspection/generate-changelog.html)) and consult the Liquibase forums for help.

---

<div class="post-metadata">

**Author:** ![marko](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@marko](https://forum.keycloak.org/u/marko)\
**Post date:** [May 8, 2024, 11:42am UTC](https://forum.keycloak.org/t/generate-openapi-spec-and-changelog-xml-files/25771/5 "2024-05-08T11:42:55Z")

</div>

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