> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/api-references/quickstart/openapi-generator.md).

# OpenAPI Generator

To facilitate customizations of Emporix Commerce Engine, so that it is tailored to your needs, you can use the OpenAPI generator\
The tool allows you to generate code out of the API reference specifications.\
You can create a Software Development Kit (SDK) based on the OpenAPI-generated code using Emporix services,\
which you can then integrate into your codebase to seamlessly build your platform with the Commerce Engine.

### Prerequisites

Make sure you have the following tools installed:

* maven - version 3.5.4\_1 or higher
* Java - version 17.0 or higher

### Installing

Download the Maven project OpenAPI Generator and unpack it in a relevant destination.

### Using OpenAPI Generator

1. Download Emporix OpenAPI reference documentation for all Commerce Engine services from the [Emporix API](https://github.com/emporix/api-references/blob/main/quickstart/README.md).
2. For the service of your interest, copy its API reference yml file to the `src/main/resources/apis` directory.

{% hint style="warning" %}
The file has to be named as `api.yml`.\
If you want to choose a different name for the file, adjust the `pom.xml` by pointing to the right file name in the `<inputSpec></inputSpec>` property.
{% endhint %}

3. In the command-line tool, open `apireference-client-generator` and run

```
mvn clean compile
```

**Result:** This command generates the code out of API reference documentation in the `target` directory. You can see the generated classes under `/target/generated-sources/openapi/src/`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references/quickstart/openapi-generator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
