-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #916 from Kotlin/openapi-runtime
Split OpenAPI in module needed for user projects and module needed for code-generation
- Loading branch information
Showing
40 changed files
with
112 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
plugins { | ||
with(libs.plugins) { | ||
alias(kotlin.jvm) | ||
alias(publisher) | ||
alias(serialization) | ||
alias(kover) | ||
alias(ktlint) | ||
alias(jupyter.api) | ||
} | ||
} | ||
|
||
group = "org.jetbrains.kotlinx" | ||
|
||
val jupyterApiTCRepo: String by project | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven(jupyterApiTCRepo) | ||
} | ||
|
||
dependencies { | ||
api(project(":core")) | ||
api(project(":dataframe-openapi")) | ||
|
||
implementation(libs.sl4j) | ||
implementation(libs.kotlinLogging) | ||
implementation(libs.kotlin.reflect) | ||
implementation(libs.kotlinpoet) | ||
api(libs.swagger) { | ||
// Fix for Android | ||
exclude("jakarta.validation") | ||
} | ||
|
||
testApi(project(":core")) | ||
testImplementation(libs.junit) | ||
testImplementation(libs.kotestAssertions) { | ||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8") | ||
} | ||
} | ||
|
||
kotlinPublications { | ||
publication { | ||
publicationName = "dataframeOpenApi" | ||
artifactId = project.name | ||
description = "OpenAPI code generation support for Kotlin Dataframe" | ||
packageName = artifactId | ||
} | ||
} | ||
|
||
kotlin { | ||
explicitApi() | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
dataframe-openapi-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/getMarker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.jetbrains.kotlinx.dataframe.io | ||
|
||
import org.jetbrains.kotlinx.dataframe.codeGen.FieldType | ||
import org.jetbrains.kotlinx.dataframe.codeGen.Marker | ||
import org.jetbrains.kotlinx.dataframe.codeGen.MarkerVisibility | ||
import org.jetbrains.kotlinx.dataframe.codeGen.ValidFieldName | ||
|
||
internal fun AdditionalProperty.Companion.getMarker(typeArguments: List<String>) = | ||
Marker( | ||
name = AdditionalProperty::class.qualifiedName!!, | ||
isOpen = false, | ||
fields = listOf( | ||
generatedFieldOf( | ||
fieldName = ValidFieldName.of(AdditionalProperty<*>::key.name), | ||
columnName = AdditionalProperty<*>::key.name, | ||
overrides = false, | ||
fieldType = FieldType.ValueFieldType(String::class.qualifiedName!!), | ||
), | ||
generatedFieldOf( | ||
fieldName = ValidFieldName.of(AdditionalProperty<*>::`value`.name), | ||
columnName = AdditionalProperty<*>::`value`.name, | ||
overrides = false, | ||
fieldType = FieldType.ValueFieldType(Any::class.qualifiedName!! + "?"), | ||
), | ||
), | ||
superMarkers = emptyList(), | ||
visibility = MarkerVisibility.EXPLICIT_PUBLIC, | ||
typeParameters = emptyList(), | ||
typeArguments = typeArguments, | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,4 @@ plugins { | |
} | ||
include("dataframe-excel") | ||
include("core") | ||
include("dataframe-openapi-generator") |