MyGit
🚩收到GitHub仓库的更新通知

papsign/Ktor-OpenAPI-Generator

Fork: 41 Star: 236 (更新于 2024-05-10 02:46:39)

license: Apache-2.0

Language: Kotlin .

Ktor OpenAPI/Swagger 3 Generator

最后发布版本: 0.3-beta.3 ( 2022-06-19 06:07:14)

GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

Ktor OpenAPI Generator

Build

The Ktor OpenAPI Generator is a library to automatically generate the descriptor as you route your ktor application.

Ktor OpenAPI Generator is:

  • Modular
  • Strongly typed
  • Explicit

Currently Supported:

  • Authentication interoperability with strongly typed Principal (OAuth only, see TestServer in tests)
  • Content Negotiation interoperability (see TestServer in tests)
  • Custom response codes (as parameter in @Response)
  • Automatic and custom content Type routing and parsing (see com.papsign.ktor.openapigen.content.type, Binary Parser and default JSON parser (that uses the ktor implicit parsing/serializing))
  • Exception handling (use .throws(ex) {} in the routes with an APIException object) with Status pages interop (with .withAPI in the StatusPages configuration)
  • tags (.tag(tag) {} in route with a tag object, currently must be an enum, but may be subject to change)
  • Spec compliant Parameter Parsing (see basic example)
  • Legacy Polymorphism with use of @DiscriminatorAnnotation() attribute and sealed classes

Extra Features:

  • Includes Swagger-UI (enabled by default, can be managed in the install(OpenAPIGen) { ... } section)

Examples

Take a look at a few examples

Who is using it?

And others... (add your name above)

Installation

Gradle

Step 1. Add the JitPack repository to your build file:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency:

dependencies {
        implementation 'com.github.papsign:Ktor-OpenAPI-Generator:-SNAPSHOT'
}

Git Submodule

Install the submodule:

git submodule add https://github.com/papsign/Ktor-OpenAPI-Generator.git openapigen

Declare the folder in settings.gradle:

...
include 'openapigen'

Declare the dependency in the main build.gradle

apply plugin: 'kotlin'

...

dependencies {
    compile project(":openapigen")
    ...
}

最近版本更新:(数据更新于 2024-05-10 15:43:43)

2022-06-19 06:07:14 0.3-beta.3

2021-11-05 20:09:45 0.3-beta.2

2021-11-03 00:54:41 0.3-beta.1

2021-07-24 06:00:18 0.2-beta.20

2021-07-20 22:52:28 0.2-beta.19

2021-05-26 19:42:48 0.2-beta.18

2021-05-26 19:35:47 0.2-beta.17

2021-03-18 00:01:07 0.2-beta.16

2021-03-09 02:28:52 0.2-beta.15

2021-03-01 00:33:31 0.2-beta.14

主题(topics):

kotlin, ktor, ktor-framework, ktor-openapi-generator, openapi, openapi-generator, swagger, swagger-ui

papsign/Ktor-OpenAPI-Generator同语言 Kotlin最近更新仓库

2024-05-17 12:20:56 simondankelmann/Bluetooth-LE-Spam

2024-05-11 02:57:18 markusfisch/BinaryEye

2024-05-10 03:57:07 recloudstream/cloudstream

2024-05-09 14:12:10 tiann/KernelSU

2024-05-09 06:30:21 ReVanced/revanced-patches

2024-05-07 21:39:17 JLLeitschuh/ktlint-gradle