Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/quarkiverse/quarkus-kiota

Generate client SDKs using Kiota from OpenAPI descriptions
https://github.com/quarkiverse/quarkus-kiota

kiota quarkus-extension

Last synced: about 1 month ago
JSON representation

Generate client SDKs using Kiota from OpenAPI descriptions

Awesome Lists containing this project

README

        

# Quarkus - Kiota Extension

[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)

[![Build]()](https://github.com/quarkiverse/quarkus-kiota/actions?query=workflow%3ABuild)
[![Maven Central](https://img.shields.io/maven-central/v/io.quarkiverse.kiota/quarkus-kiota.svg?label=Maven%20Central&style=flat-square)](https://search.maven.org/artifact/io.quarkiverse.kiota/quarkus-kiota)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0)

Quarkus' extension for generation of client SDKs based on OpenAPI specification files.

This extension is based on the [Kiota](https://github.com/microsoft/kiota).

**Want to contribute? Great!** We try to make it easy, and all contributions, even the smaller ones, are more than welcome. This includes bug reports, fixes, documentation, examples... But first, read [this page](CONTRIBUTING.md).

## Getting Started

If you have a supersonic, subatomic [Quarkus](https://quarkus.io/) project you can use this extension to generate code with Kiota:

```xml

io.quarkiverse.kiota
quarkus-kiota
VERSION

```

remember to enable the code generation in the `quarkus-maven-plugin` configuration, if not already present, add `generate-code`:

```xml

io.quarkus
quarkus-maven-plugin



build
generate-code


```

now you can drop any Open API specification in the `src//openapi` folder and configure the extension as usual with Quarkus configuration.
We highly encourage you to pin `quarkus.kiota.version` to a specific version instead of relying on the "latest detection" built-in mechanism for production code.

| config | description |
|---|---|
| quarkus.kiota.os | Override the detected Operating System |
| quarkus.kiota.arch | Override the detected Architecture |
| quarkus.kiota.provided | Specify the path to an available Kiota CLI to be used |
| quarkus.kiota.release.url | Define an alternative URL to be used to download the Kiota CLI |
| quarkus.kiota.version | Define a specific Kiota version to be used |
| quarkus.kiota.timeout | Global timeout over the execution of the Kiota CLI |

To fine tune the generation you can define additional properties after the Open API spec file name:

| config | description |
|---|---|
| quarkus.kiota.< filename >.class-name | Specify the name for the generated client class |
| quarkus.kiota.< filename >.package-name | Specify the name of the package for the generated sources |
| quarkus.kiota.< filename >.include-path | Glob expression to identify the endpoint to be included in the generation |
| quarkus.kiota.< filename >.exclude-path | Glob expression to identify the endpoint to be excluded in the generation |
| quarkus.kiota.< filename >.serializer | Overwrite the serializers for the generation |
| quarkus.kiota.< filename >.deserializer | Overwrite the deserializers for the generation |

Using the extension, by default, the Json serializer and deserializer will be based on Jackson instead of the official one based on Gson.

> If you want to improve the docs, please feel free to contribute editing the docs in [Docs](https://github.com/quarkiverse/quarkus-kiota/tree/main/docs/modules/ROOT). But first, read [this page](CONTRIBUTING.md).

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Andrea Peruffo
Andrea Peruffo

💻 🚧
George Gastaldi
George Gastaldi

💻 🚧

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!