Skip to content

Commit

Permalink
Disable publish in root
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisRev committed Jun 22, 2024
1 parent 1b80bdb commit cb58391
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
26 changes: 26 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# OpenAPI-kt

[![Maven Central](https://img.shields.io/maven-central/v/io.github.nomisrev/openapi-kt?color=4caf50&label=latest%20release)](https://central.sonatype.com/search?q=g:io.github.nomisrev/openapi-kt)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)

**WORK IN PROGRESS**

OpenKTTP is a toolset for working with OpenAPI in Kotlin.
Expand All @@ -9,3 +12,26 @@ This project exists out of several pieces, and they can be combined in different
- OpenAPI Typed: A version of the `Core` ADT, structures the data in a convenient way to retrieve.
- Generator: A code generator that generates code from the `OpenAPI Typed` ADT
- Gradle Plugin: Gradle plugin to conveniently generate clients

## Code Generation

Add the following to your `build.gradle.kts` file.

```kotlin
plugin {
id("io.github.nomisrev.openapi.plugin") version "0.0.1"
}

openApiConfig {
spec.set(file("openapi.json"))
}
```

Then run the following command to generate the code.

```shell
./gradlew generateOpenApi
```

This will generate a `io.github.nomisrev.openapi` package with the generated code,
in your `/build/generated` directory.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.jetbrains.kotlin.powerassert.gradle.PowerAssertGradleExtension
plugins {
alias(libs.plugins.multiplatform) apply false
alias(libs.plugins.assert)
alias(libs.plugins.publish)
alias(libs.plugins.publish) apply false
}

@Suppress("OPT_IN_USAGE")
Expand Down
5 changes: 3 additions & 2 deletions generation/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
POM_NAME=openapi-kt-generator
POM_DESCRIPTION=OpenAPI Kotlin Generator
POM_ARTIFACT_ID=openapi-kt-generator
POM_NAME=OpenAPI Kotlin Generator
POM_DESCRIPTION=Module to generate Kotlin code from OpenAPI specifications using KotlinPoet
5 changes: 3 additions & 2 deletions parser/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
POM_NAME=openapi-kt-parser
POM_DESCRIPTION=OpenAPI Kotlin Parser
POM_ARTIFACT_ID=openapi-kt-parser
POM_NAME=OpenAPI Kotlin Parser
POM_DESCRIPTION=Module to parse OpenAPI specifications using kotlinx.serialization
5 changes: 3 additions & 2 deletions typed/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
POM_NAME=openapi-kt-generator
POM_DESCRIPTION=OpenAPI Kotlin Generator
POM_ARTIFACT_ID=openapi-kt-generator
POM_NAME=OpenAPI Kotlin Generator
POM_DESCRIPTION=Module to transform parsed OpenAPI from parser into a structured model

0 comments on commit cb58391

Please sign in to comment.