Skip to content

test(demo): OAS 3.1/3.2 demo fixtures for API Console v6 (W-23748889) - #906

Draft
alexpmule wants to merge 1 commit into
spike/oas-3x-amf-bumpfrom
W-23748889/oas-31-32-fixtures
Draft

test(demo): OAS 3.1/3.2 demo fixtures for API Console v6 (W-23748889)#906
alexpmule wants to merge 1 commit into
spike/oas-3x-amf-bumpfrom
W-23748889/oas-31-32-fixtures

Conversation

@alexpmule

@alexpmule alexpmule commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What

Adds two demo fixtures exercising OAS 3.1 and 3.2, registered in the model manifest and the demo app picker, so API Console v6 has real modern-spec models to render against.

Why

W-23748889 (parent W-23735927, TD-0333486). This WI is the foundation for the five rendering stories under the parent (oneOf/anyOf, if/then/else, QUERY, SSE, webhooks) — each needs real fixtures to build and test against.

Changes

  • demo/models/oas31-webhooks/oas31-webhooks.yaml — OAS 3.1.0: top-level webhooks (POST newPet) + allOf / if-then-else / oneOf / anyOf schema composition.
  • demo/models/oas32-query-sse/oas32-query-sse.yaml — OAS 3.2.0: query: Path Item field (QUERY method) + /pets/events GET with text/event-stream + itemSchema (SSE).
  • demo/apis.json — manifest entries ("OAS 3.1" / "OAS 3.2").
  • demo/element/app.js — demo picker entries.

Generated models (demo/models/*.json) are gitignored build artifacts, regenerated by npm run generate-model.

Verification

  • npm run build (rollup) → passes (created dist), no new warnings.
  • With a fixture-capable generator, both specs generate with conforms: true: oas31-webhooks emits Webhook nodes; oas32-query-sse emits QUERY + event-stream. No regression on existing RAML/OAS 3.0 fixtures.

Stacked — merge order

  1. base of this PRmulesoft/api-console#905 (spike/oas-3x-amf-bump): amf-client-js + api-model-generator dependency bump.
  2. feat(oas): support OAS 3.1 and 3.2 in getConfiguration (W-23748889) api-components/api-model-generator#20: adds OAS 3.1/3.2 to getConfigurationmust merge + republish (0.4.0) so generate-model produces the 3.1/3.2 models. Until then the published 0.3.1 throws Unknown API type: OAS 3.1 and these fixtures generate no output.
  3. Re-point #905 (and this PR) to the republished api-model-generator version, then merge this.

⚠️ The dependency bump alone does not enable OAS 3.1/3.2 — the getConfiguration code lives in the external @api-components/api-model-generator package (see PR #20). This is a two-repo change with an npm republish in between.

🤖 Generated with Claude Code

Adds two demo specs and registers them in the model manifest and demo
app picker so the console has real OAS 3.1/3.2 models to render against:

- oas31-webhooks.yaml: top-level webhooks + allOf/if-then-else/oneOf/anyOf
- oas32-query-sse.yaml: QUERY method + text/event-stream (SSE) via itemSchema

Both parse with conforms:true under AMF 5.11.x. Generated models are
build artifacts (demo/models/*.json, gitignored), produced by
generate-model once api-model-generator republishes with OAS 3.1/3.2
support (api-components/api-model-generator#20).

W-23748889 (parent W-23735927).
alexpmule added a commit to api-components/api-model-generator that referenced this pull request Aug 10, 2026
Bump version so CI publishes the new package with OAS 3.1/3.2 support.
The publish job reads version from package.json and runs npm publish;
without this bump the release would collide with the existing 0.3.1 and
consumers (mulesoft/api-console#906) could not pick up the fix.
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.

1 participant