Skip to content

feat(oas): support OAS 3.1 and 3.2 in getConfiguration (W-23748889) - #20

Merged
alexpmule merged 3 commits into
masterfrom
W-23748889/getconfig-oas-31-32
Aug 14, 2026
Merged

feat(oas): support OAS 3.1 and 3.2 in getConfiguration (W-23748889)#20
alexpmule merged 3 commits into
masterfrom
W-23748889/getconfig-oas-31-32

Conversation

@alexpmule

@alexpmule alexpmule commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What

Adds OAS 3.1 and OAS 3.2 handling to getConfiguration, which previously stopped at OAS 3.0 and threw Unknown API type: OAS 3.1 for newer specs. Bumps amf-client-js to the line that exposes the OAS31() / OAS32() AMF configurations.

Why

This is the enabling change for W-23748889 (parent W-23735927, TD-0333486 — API Console OAS 3.1/3.2 support). The api-console v6 demo/test pipeline consumes this package to generate AMF models; without these cases it cannot produce fixtures for 3.1 (webhooks, if/then/else, oneOf/anyOf) or 3.2 (QUERY method, SSE). The published 0.3.1 does not include them — a republish (this PR bumps to 0.4.0) is required before the console PR can generate real models.

Changes

  • index.js — add case 'OAS 3.1' → OASConfiguration.OAS31() and case 'OAS 3.2' → OASConfiguration.OAS32().
  • types.d.ts — extend ApiType with 'OAS 3.1' | 'OAS 3.2'.
  • package.json / package-lock.json — bump amf-client-js ^5.10.25.11.7902.
  • package.json / package-lock.json / CHANGELOG.md — bump package version 0.3.10.4.0 so CI publishes the fix (the publish job reads version from package.json).
  • test/ — add oas31-webhooks.yaml + oas32-query-sse.yaml fixtures and regular/compact generation tests with content assertions (webhooks, QUERY, event-stream).

Verification

  • npm ci && npm test28 passing (22 pre-existing + 6 new OAS 3.1/3.2), no regressions.
  • New fixtures parse with conforms: true under AMF 5.11.7902.

⚠️ Risk — pinned AMF snapshot

5.11.7902 is an AMF snapshot, not a stable release. No stable amf-client-js release exposes OAS 3.2 yet (latest = 5.10.2-10, which lacks 3.2). Pinned to an exact snapshot version to keep builds reproducible. Re-pin to a stable 5.11.x once one ships. This mirrors the pin used by the consumer bump in mulesoft/api-console#905.

Stacked with

  • mulesoft/api-console#905 — consumer dependency bump (amf-client-js + api-model-generator).
  • mulesoft/api-console#906 (draft) — adds the 3.1/3.2 demo fixtures once this republishes as 0.4.0.

🤖 Generated with Claude Code

getConfiguration stopped at OAS 3.0 and threw "Unknown API type" for
3.1/3.2, so consumers could not generate AMF models for modern specs
(webhooks, QUERY method, SSE). Add OAS31/OAS32 configuration cases and
bump amf-client-js to 5.11.7902, the line that exposes those AMF
configurations.

Extends ApiType with 'OAS 3.1'/'OAS 3.2' and adds regular + compact
generation tests plus content assertions (webhooks, QUERY, event-stream)
against real 3.1/3.2 fixtures.

Note: 5.11.7902 is an AMF snapshot; no stable amf-client-js release
exposes OAS 3.2 yet (latest is 5.10.2-10). Pinned exact until a stable
5.11.x ships.

Enables W-23748889 (parent W-23735927, TD-0333486).
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.
@alexpmule alexpmule self-assigned this Aug 10, 2026
AMF team-provided build with OAS 3.1/3.2 fixes over 5.11.7902.
Resolves the getConfiguration OAS31/OAS32 support in 0.4.0.
@alexpmule
alexpmule merged commit 515c5aa into master Aug 14, 2026
3 checks passed
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.

2 participants