https://github.com/gecsea/gecsevar-openapi
Open-API code generator for kotlin projects
https://github.com/gecsea/gecsevar-openapi
codegenerator kotlin openapi plugin
Last synced: 3 months ago
JSON representation
Open-API code generator for kotlin projects
- Host: GitHub
- URL: https://github.com/gecsea/gecsevar-openapi
- Owner: GecseA
- Created: 2023-04-16T20:45:16.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-12-25T21:24:45.000Z (3 months ago)
- Last Synced: 2025-12-27T08:01:05.237Z (3 months ago)
- Topics: codegenerator, kotlin, openapi, plugin
- Language: Kotlin
- Homepage: https://gecsevar.hu
- Size: 209 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/GecseA/gecsevar-openapi/actions)
[](https://mvnrepository.com/artifact/hu.gecsevar/gv-openapi)
# gecsevar-openapi
Yet Another Custom Open API generator (probably ;)
# Features:
kotlin-ktor-server
- model
- api (Route.XXX and interface)
kotlin-multiplatform-client (mobile Android & iOS related)
- model
- api (client Http calls)
# How to use
Simply add a task to your gradle build config like:
(builds are in the central repo)
```
kotlin {
jvmToolchain(21)
sourceSets {
getByName("main").kotlin.srcDirs("${layout.buildDirectory.get()}/generated/my")
}
}
buildscript {
dependencies {
classpath("hu.gecsevar:gv-openapi")
}
}
tasks.create("openApiGenerate" + "MyApi", GenerateTask::class.java) {
generatorName.set("gv-ktor-server")
inputSpec.set("$rootDir/src/main/resources/my-awesome.yaml")
outputDir.set("${layout.buildDirectory.get()}/generated/")
apiPackage.set("my.domain.api")
modelPackage.set("my.domain.schemas")
//optional nameMappings.set(mutableMapOf("challenge_ts" to "challenge_ts")) // _ REPLACED TO underscore IF NOT MAPPED
}
tasks.compileKotlin {
dependsOn("openApiGenerateMyApi")
}
```