Skip to content

test(core): integration tests against popular public OpenAPI specs#90

Merged
mfabisiak merged 3 commits into
masterfrom
test/47-public-spec-integration
Jul 21, 2026
Merged

test(core): integration tests against popular public OpenAPI specs#90
mfabisiak merged 3 commits into
masterfrom
test/47-public-spec-integration

Conversation

@halotukozak

@halotukozak halotukozak commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What

Adds integration tests against popular public OpenAPI specs, vendored under core/src/test/resources/fixtures/public/ (provenance in SOURCES.md):

  • Swagger Petstore (OpenAPI 3.0.4) — canonical
  • OAI petstore-expandedallOf composition
  • OAI USPTO — real government API, server variables, freeform responses

Two tests (in IntegrationTest, so they run under ./gradlew test):

  • public specs parse without errors — each yields ParseResult.Success; warnings are logged, never silent.
  • public specs generate non-empty model and client code — model + client output is non-empty; client classes contain suspend fun.

Specs are vendored (not fetched at build time) for deterministic, offline runs.

Known limitations surfaced as warnings (not failures)

  • uspto: one freeform response → JsonElement + warning.

(petstore-expanded had an upstream type: sthciring typo in NewPet.tag, corrected to string in the vendored copy — noted in SOURCES.md.)

Closes #47

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Coverage Report

Overall Project 96.97% 🍏

There is no coverage information present for the Files changed

Adds vendored public specs (Swagger Petstore 3.0, OAI petstore-expanded,
OAI USPTO) under fixtures/public and integration tests that verify each
parses without errors and generates non-empty model + client code.
Known limitations surface as logged warnings, not silent failures
(e.g. USPTO's freeform search response degrades to JsonElement with a
warning). Runs as part of `./gradlew test`.

Closes #47

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@halotukozak
halotukozak force-pushed the test/47-public-spec-integration branch from 3f08d78 to a026e79 Compare June 9, 2026 16:06
@halotukozak halotukozak self-assigned this Jun 9, 2026
IntegrationTest verified only that public specs parsed and produced
non-empty output. Add per-spec assertions on the actual generated
model and client code: required/optional property nullability,
$ref and additionalProperties type mapping, allOf flattening,
query/body param handling, 204 -> Unit, and freeform-response
degradation to JsonElement.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mfabisiak
mfabisiak self-requested a review July 21, 2026 18:59

@mfabisiak mfabisiak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI review requested due to automatic review settings July 21, 2026 19:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mfabisiak
mfabisiak merged commit 25a11fc into master Jul 21, 2026
2 checks passed
@mfabisiak
mfabisiak deleted the test/47-public-spec-integration branch July 21, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration tests against popular public OpenAPI specs (Petstore, Stripe, GitHub)

3 participants