-
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.
Split openapi support in two modules, to avoid adding dependencies ne…
…eded only for code-generation to project runtime classpath
- Loading branch information
Showing
36 changed files
with
103 additions
and
62 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
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
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") |