feat(oas): support OAS 3.1 and 3.2 in getConfiguration (W-23748889) - #20
Merged
Conversation
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).
alexpmule
marked this pull request as ready for review
August 10, 2026 19:39
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.
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.
leandrogilcarrano
approved these changes
Aug 14, 2026
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.
What
Adds OAS 3.1 and OAS 3.2 handling to
getConfiguration, which previously stopped at OAS 3.0 and threwUnknown API type: OAS 3.1for newer specs. Bumpsamf-client-jsto the line that exposes theOAS31()/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.1does not include them — a republish (this PR bumps to0.4.0) is required before the console PR can generate real models.Changes
index.js— addcase 'OAS 3.1' → OASConfiguration.OAS31()andcase 'OAS 3.2' → OASConfiguration.OAS32().types.d.ts— extendApiTypewith'OAS 3.1' | 'OAS 3.2'.package.json/package-lock.json— bumpamf-client-js^5.10.2→5.11.7902.package.json/package-lock.json/CHANGELOG.md— bump package version0.3.1→0.4.0so CI publishes the fix (the publish job readsversionfrompackage.json).test/— addoas31-webhooks.yaml+oas32-query-sse.yamlfixtures and regular/compact generation tests with content assertions (webhooks, QUERY, event-stream).Verification
npm ci && npm test→ 28 passing (22 pre-existing + 6 new OAS 3.1/3.2), no regressions.conforms: trueunder AMF 5.11.7902.5.11.7902is an AMF snapshot, not a stable release. No stableamf-client-jsrelease 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 stable5.11.xonce one ships. This mirrors the pin used by the consumer bump inmulesoft/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 as0.4.0.🤖 Generated with Claude Code