test: add integration test for real-world spec - #15
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a large-spec integration test intended to exercise the full OpenAPI → Kotlin generation pipeline, while also introducing a Gradle plugin module and adding repository planning/analysis docs.
Changes:
- Add
IntegrationTest(plus a couple of targeted generator tests) to validate generation behavior against a local real-worldump-api.jsonfixture. - Introduce a new
pluginmodule with a multi-specjustworks { specs { ... } }DSL and generation tasks. - Add
.planning/documentation files and update.gitignore(including ignoring theump-api.jsonfixture).
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Includes the new plugin module in the build. |
| plugin/src/main/kotlin/com/avsystem/justworks/gradle/JustworksSpecConfiguration.kt | Adds per-spec configuration model for the plugin DSL. |
| plugin/src/main/kotlin/com/avsystem/justworks/gradle/JustworksSharedTypesTask.kt | Adds a task to generate shared response/error wrapper types. |
| plugin/src/main/kotlin/com/avsystem/justworks/gradle/JustworksPlugin.kt | Registers the extension and per-spec generation tasks; wires outputs into source sets. |
| plugin/src/main/kotlin/com/avsystem/justworks/gradle/JustworksGenerateTask.kt | Adds the main generation task (parse spec → model/client/base generation → write to disk). |
| plugin/src/main/kotlin/com/avsystem/justworks/gradle/JustworksExtension.kt | Adds the top-level justworks extension exposing the specs container. |
| plugin/build.gradle.kts | Adds Gradle plugin module build + functional test source set. |
| core/src/test/kotlin/com/avsystem/justworks/core/gen/TypeMappingTest.kt | Adds a new assertion around Instant type mapping. |
| core/src/test/kotlin/com/avsystem/justworks/core/gen/ModelGeneratorTest.kt | Adds a regression test for enum constant generation output. |
| core/src/test/kotlin/com/avsystem/justworks/core/gen/IntegrationTest.kt | Adds optional local-fixture integration tests for a large real-world spec. |
| .planning/PROJECT.md | Adds project overview/planning notes. |
| .planning/codebase/TESTING.md | Adds testing patterns documentation. |
| .planning/codebase/STRUCTURE.md | Adds codebase structure documentation. |
| .planning/codebase/STACK.md | Adds stack/dependencies documentation. |
| .planning/codebase/INTEGRATIONS.md | Adds external integrations documentation. |
| .planning/codebase/CONVENTIONS.md | Adds coding conventions documentation. |
| .planning/codebase/CONCERNS.md | Adds concerns/tech-debt documentation. |
| .planning/codebase/ARCHITECTURE.md | Adds architecture documentation. |
| .gitignore | Ignores .planning/ and the large ump-api.json fixture path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
- Add test asserting enum constants have no class body braces - Add test asserting @SerialName annotations present on enum constants - Add test asserting @serializable on generated enum class Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Verify INSTANT constant uses kotlin.time package - Lock Instant mapping to prevent accidental regression Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Copy 5 plugin source files from draft branch to current working tree - Fix SpecParser usage (object, not class) and ParseResult field name - Replace non-existent generateTo/getSealedHierarchies with current core API - Wire ApiClientBaseGenerator into JustworksGenerateTask for endpoint specs - Add KotlinPoet dependency to plugin for FileSpec.writeTo support - Add plugin module to settings.gradle.kts - Add ktlint version override consistent with core module Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Create IntegrationTest.kt validating full generation pipeline against 725KB ump-api.json - Verify enum generation produces no anonymous class body conflicts - Verify @SerialName and @serializable annotations present on generated enums - Verify ApiClientBase generation and full client pipeline - Add .gitignore entry to exclude ump-api.json fixture from version control - Tests skip gracefully when fixture file is not available Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace ump-api references with generic real-world-spec naming to avoid exposing internal API details. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
halotukozak
force-pushed
the
fix/integration-test-ump-api
branch
from
March 20, 2026 09:21
ddeb0c6 to
8901786
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
halotukozak
force-pushed
the
fix/integration-test-ump-api
branch
from
March 20, 2026 09:56
f69147a to
20ab704
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
halotukozak
force-pushed
the
fix/integration-test-ump-api
branch
from
March 20, 2026 10:13
df89b97 to
8d05713
Compare
|
… tests Replace skip-if-missing fixture approach with two committed anonymized specs (platform-api.json, analytics-api.json) derived from production OpenAPI definitions. All domain-specific names, endpoints, schemas, and fields have been replaced with generic equivalents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
halotukozak
added a commit
that referenced
this pull request
Mar 20, 2026
test: add integration test for real-world spec
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependencies
Test plan
core/src/test/resources/locally./gradlew :core:test --tests "*.IntegrationTest"passes🤖 Generated with Claude Code