Skip to content

Commit 86b0229

Browse files
committed
Improve OpenAPI 3.2.0 compliance
1 parent 339c636 commit 86b0229

25 files changed

+2970
-715
lines changed

src/main/kotlin/Main.kt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import domain.Info
2+
import domain.Contact
3+
import domain.License
14
import scaffold.ScaffoldGenerator
25
import java.io.File
36

@@ -10,11 +13,28 @@ fun main() {
1013

1114
println("Generating KMP Scaffold into: ${outputDir.absolutePath}...")
1215

16+
// Create an OpenAPI Info object (Mocking input from a Specification)
17+
val appInfo = Info(
18+
title = "My Generated App",
19+
version = "2.4.1",
20+
summary = "An example KMP application generated by cdd-kotlin",
21+
contact = Contact(
22+
name = "Support Team",
23+
email = "[email protected]",
24+
url = "https://example.com/support"
25+
),
26+
license = License(
27+
name = "Apache 2.0",
28+
identifier = "Apache-2.0"
29+
)
30+
)
31+
1332
try {
1433
generator.generate(
1534
outputDirectory = outputDir,
1635
projectName = "MyGeneratedApp",
17-
packageName = "com.example.auto"
36+
packageName = "com.example.auto",
37+
info = appInfo
1838
)
1939
println("Success! Open 'generated-project' in IntelliJ to see the result.")
2040
} catch (e: Exception) {

0 commit comments

Comments
 (0)