Micronaut Swagger API

Project provides user-friendly integration for merging, exposing Swagger/OpenAPI files.

Лицензия

Лицензия

Категории

Категории

Micronaut Контейнер Микросервисы Swagger Межпрограммное взаимодействие REST Frameworks
Группа

Группа

com.github.goodforgod
Идентификатор

Идентификатор

micronaut-swagger-api
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

pom.sha512
Описание

Описание

Micronaut Swagger API
Project provides user-friendly integration for merging, exposing Swagger/OpenAPI files.
Ссылка на сайт

Ссылка на сайт

https://github.com/GoodforGod/micronaut-swagger-api
Система контроля версий

Система контроля версий

https://github.com/GoodforGod/micronaut-swagger-api/tree/master

Скачать micronaut-swagger-api

Зависимости

runtime (2)

Идентификатор библиотеки Тип Версия
org.jetbrains : annotations jar 20.1.0
io.micronaut : micronaut-http-server-netty jar

Модули Проекта

Данный проект не имеет модулей.

Micronaut Swagger API

Java CI Quality Gate Status Coverage Maintainability Rating

This project provides out-of-box user-friendly integration for merging Swaggers (OpenAPI also), exposing Swagger & Swagger-UI HTTP endpoints.

Dependency 🚀

Library ships ready for Micronaut 2.

Gradle

dependencies {
    compile 'com.github.goodforgod:micronaut-swagger-api:1.0.0'
}

Maven

<dependency>
    <groupId>com.github.goodforgod</groupId>
    <artifactId>micronaut-swagger-api</artifactId>
    <version>1.0.0</version>
</dependency>

Endpoints

Library provide exposure for statis resources:

  • /swagger - Endpoint for exposing merged Swagger (if there are any to merge) as static resource.
  • /swagger-ui - Endpoint for exposing Swagger UI page resource.
  • /rapidoc - Endpoint for exposing Rapidoc page resource.

Swagger

Library only exposes Swagger files, not generating them, so you need to generate Swagger for your service first and library will help with its exposure.

By adding to your Gradle dependencies:

annotationProcessor("io.micronaut.configuration:micronaut-openapi:2.1.0")
implementation("io.swagger.core.v3:swagger-annotations")

Check Micronaut official documentation for more information.

Configuration

Library provides out-of-box /swagger (merge enabled), /swagger-ui, /rapidoc endpoints.

There is ability to easily merge multiple Swagger files via simple configuration property.

Other settings are available to configure for service, however most of them are default for user-friendly bootstrap just by adding library as dependency.

swagger:
  enabled: true       // enalbed Swagger YAML exposing via HTTP endpoint  (default - true)
  merge: true         // enabled merging swaggers if multiple found       (default - true)
  exclude:            // Exclude some swagger files
  - swagger-1.yml
  - swagger-2.yml
  path: /swagger      // path for Swagger HTTP endpoint                   (default - /swagger)
  ui:
    path: /swagger-ui // path for Swagger-UI HTTP endpoint                (default - /swagger-ui)
    enalbed: true     // enalbed Swagger-UI exposing via HTTP endpoint    (default - true)
  rapidoc:
    path: /rapidoc    // path for Rapidoc HTTP endpoint                   (default - /rapidoc)
    enalbed: true     // enalbed Rapidoc exposing via HTTP endpoint       (default - false) 

Version History

1.0.0 - Initial version, with /swagger, /swagger-ui, /rapidoc HTTP endpoint support.

License

This project licensed under the Apache License 2.0 - see the LICENSE file for details.

Версии библиотеки

Версия
1.0.0