feat(demo): enable OAS 3.1/3.2 models + demo fixtures for API Console v6 (W-23748889) - #909
Open
alexpmule wants to merge 3 commits into
Open
feat(demo): enable OAS 3.1/3.2 models + demo fixtures for API Console v6 (W-23748889)#909alexpmule wants to merge 3 commits into
alexpmule wants to merge 3 commits into
Conversation
Bump amf-client-js ^5.4.4 -> ^5.11.7902 and @api-components/api-model-generator ^0.2.14 -> ^0.3.1 so the console's model-generation path runs on an AMF line that understands OAS 3.1 (webhooks, if/then/else) and OAS 3.2 (QUERY, SSE). The generator was pinned to a nested amf-client-js 4.7.8 that predates OAS 3.1/3.2 support; without bumping it, generating 3.1/3.2 fixtures fails. This is the enabling dependency step for TD-0333486 (rendering work lands separately). Verified: rollup build succeeds; AMF 5.11.x parses 3.1/3.2 specs and emits webhooks as a `webhooks` collection of EndPoint nodes (sibling to `endpoint`), plus QUERY method and text/event-stream SSE. TD-0333486
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).
Bumps @api-components/api-model-generator ^0.3.1 -> ^0.4.0, which exposes OAS31/OAS32 in getConfiguration and pulls amf-client-js 5.11.12531. Generates the OAS 3.1/3.2 demo models added in 68dde60.
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
Enables OAS 3.1 and 3.2 model generation in API Console v6 and adds two demo fixtures that exercise the modern-spec features, registered in the model manifest and the demo app picker.
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 3.1/3.2 fixtures to build and test against. The bump alone was not enough: the
getConfigurationOAS31/OAS32 support lives in the external@api-components/api-model-generatorpackage (published0.3.1threwUnknown API type: OAS 3.1), so this required a two-repo change.Changes
amf-client-js^5.4.4→^5.11.7902(resolves to5.11.12531, the AMF-team build that exposes OAS31/OAS32) and@api-components/api-model-generator^0.2.14→^0.4.0.demo/models/oas31-webhooks/oas31-webhooks.yaml— OAS 3.1.0: top-levelwebhooks(POST newPet) +allOf/if-then-else/oneOf/anyOfschema composition.demo/models/oas32-query-sse/oas32-query-sse.yaml— OAS 3.2.0:query:Path Item field (QUERY method) +/pets/eventsGET withtext/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 bynpm run generate-model.Companion change (already merged + published)
getConfiguration, released as0.4.0. This PR adopts that version.npm run generate-modelnow producesconforms: truemodels for both specs.Verification
@api-components/api-model-generator@0.4.0installed;amf-client-jsdeduped to5.11.12531(single copy in the tree).npm run generate-model→ both specs generate:oas31-webhooksemits Webhook nodes;oas32-query-sseemits QUERY +event-stream. No regression on existing RAML/OAS 3.0/AsyncAPI fixtures.🤖 Generated with Claude Code