Skip to content

Commit

Permalink
Fix class name usage and additionalproperties (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilmveel authored Oct 30, 2023
1 parent 5a73dfc commit 7810a8c
Show file tree
Hide file tree
Showing 6 changed files with 1,428 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,31 @@ class CliTest {
assertTrue(file.contains(expected))
}

@Test
fun testCliKetoKotlin() {
val packageName = "community.flock.openapi"
val packageDir = packageName.replace(".", "/")
val input = "${inputDir}/openapi/keto.json"
val output = outputDir()

cli(arrayOf(input, "-o", output, "-l", "Kotlin", "-p", "community.flock.openapi", "-a", "v3"))

val path = FullFilePath("$output/$packageDir", "Keto")
val file = KotlinFile(path).read()

val expected = """
data class Relationship(
val namespace: String,
val `object`: String,
val relation: String,
val subject_id: String? = null,
val subject_set: SubjectSet? = null
)
""".trimIndent()

assertTrue(file.contains(expected))
}

@Test
fun testCliOpenapiTypesScript() {
val packageName = "community.flock.openapi"
Expand Down
Loading

0 comments on commit 7810a8c

Please sign in to comment.