Skip to content

Add compilation test to verify generated code compiles successfully #46

@halotukozak

Description

@halotukozak

Description

Current generator tests verify output via string/snapshot comparison but never compile the generated code. A compilation test would catch issues like missing imports, invalid syntax, or type mismatches that snapshot tests miss. Use Kotlin Compile Testing (e.g. com.github.tschuchortdev:kotlin-compile-testing) or a similar approach to compile generated output against Ktor/kotlinx-serialization dependencies.

Acceptance criteria

  • At least one test generates code from a representative OpenAPI spec and compiles it
  • Compilation includes necessary runtime dependencies (Ktor client, kotlinx-serialization, Arrow)
  • Test fails if generated code has syntax errors, missing imports, or type mismatches
  • Runs as part of the standard ./gradlew test suite

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions