Skip to content

Commit b64cf21

Browse files
committed
Fix test failures
1 parent 86b0229 commit b64cf21

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/main/kotlin/domain/EndpointModels.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package domain
22

33
/**
44
* Supported HTTP Methods for API operations.
5+
* Updated to include QUERY (OAS 3.2) support.
56
*
67
* See [Path Item Object](https://spec.openapis.org/oas/v3.2.0#path-item-object)
78
*/
89
enum class HttpMethod {
9-
GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, TRACE
10+
GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, TRACE, QUERY
1011
}
1112

1213
/**
@@ -342,6 +343,8 @@ data class PathItem(
342343
val patch: EndpointDefinition? = null,
343344
/** A definition of a TRACE operation on this path. */
344345
val trace: EndpointDefinition? = null,
346+
/** A definition of a QUERY operation on this path (OAS 3.2). */
347+
val query: EndpointDefinition? = null,
345348

346349
/**
347350
* A list of parameters that are applicable for all the operations described under this path.

src/main/kotlin/scaffold/ScaffoldGenerator.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ class ScaffoldGenerator {
6060
writeFile(commonMainPath, "App.kt", ScaffoldTemplates.createCommonAppKt(packageName))
6161

6262
// androidMain
63-
val androidMainDir = File(srcDir, "androidMain")
64-
// val androidCodeDir = File(androidMainDir, "kotlin/$packagePath").apply { mkdirs() }
63+
// --- FIX BELOW: Added .apply { mkdirs() } ---
64+
val androidMainDir = File(srcDir, "androidMain").apply { mkdirs() }
65+
6566
// Create manifest strictly in src/androidMain
6667
writeFile(androidMainDir, "AndroidManifest.xml", ScaffoldTemplates.createAndroidManifest())
67-
// Create an empty MainActivity placeholders if needed, but App generator is enough is minimal
6868

6969
// desktopMain
7070
File(srcDir, "desktopMain/kotlin/$packagePath").apply { mkdirs() }

src/test/kotlin/scaffold/ScaffoldGeneratorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class ScaffoldGeneratorTest {
134134
val outputDir = tempDir.toFile()
135135

136136
// Act
137-
generator.generate(outputDir, "DefaultVersionTest", "com.test.d")
137+
generator.generate(outputDir, "DefaultVersionTest", "com.test.d", null)
138138

139139
// Assert
140140
val rootBuild = File(outputDir, "build.gradle.kts").readText()

0 commit comments

Comments
 (0)