Skip to content

@W-23748890 feat(query): add QUERY method color badge (OAS 3.2) - #62

Draft
alexpmule wants to merge 3 commits into
masterfrom
W-23748890-query-badge
Draft

@W-23748890 feat(query): add QUERY method color badge (OAS 3.2)#62
alexpmule wants to merge 3 commits into
masterfrom
W-23748890-query-badge

Conversation

@alexpmule

Copy link
Copy Markdown
Contributor

@W-23748890

What

Adds a color badge for the OAS 3.2 QUERY HTTP method.

@api-components/http-method-label maps the classic verbs (get/post/put/delete/patch/…) plus publish/subscribe, but has no entry for query — so QUERY endpoints fall through to the gray --method-label-default-color. This adds a local CSS override (teal #0F9D9D) keyed on both data-method='query' and data-method='QUERY', mirroring the existing publish/subscribe local-override precedent.

Both casings are covered on purpose: AMF emits apiContract#method="QUERY" (uppercase) verbatim, which api-navigation and api-summary render raw, while api-method-documentation lowercases it via ApiUrl.js.

Why

TD-0333486 — OAS 3.1/3.2 support in API Console v6. AC2: new OAS 3.2 methods must be legible/distinguishable in the console.

Color

Teal / cyan #0F9D9D (bg rgba(15,157,157,0.12)). Read-safe and does not collide with PATCH (purple), GET (green) or POST (blue).

Tests

Green in chromium + firefox. Inline AMF expanded-model fixtures (generator-independent): renders data-method, not lowercased/uppercased incorrectly, _isGrpc false.

Related

Coordinate with Ale Loose's OAS 3.2 operationKind grouping (PR #907) at merge — both touch OAS 3.2, zero code collision.

Scope

Draft for review.

@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Alex Perez <a***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request.

@alexpmule
alexpmule force-pushed the W-23748890-query-badge branch from 119df8e to 8c91671 Compare August 18, 2026 22:17
alexpmule and others added 2 commits August 19, 2026 15:28
OAS 3.2 introduces the QUERY HTTP method, which the archived
http-method-label package does not map, so QUERY operations rendered
in the default gray, indistinguishable from unmapped verbs.

Add a local color override for the QUERY method label. The summary
renders data-method straight from the raw AMF value (QUERY, upper case)
for HTTP operations, so the rule keys on both 'query' and 'QUERY'.
Teal (#0f9d9d) is read-safe and does not collide with the PATCH purple.

W-23748890
OAS 3.2 introduces the COPY and MOVE HTTP methods alongside QUERY. The
http-method-label palette has no entry for them, so they fall back to the
default gray. Add customizable color hooks matching the QUERY approach:
COPY renders indigo, MOVE renders amber. Both are exposed as CSS custom
properties (--http-method-label-copy/move-color and -background-color)
with sensible fallbacks, and both raw (uppercase) and lower-cased
data-method casings are keyed so navigation and documentation views agree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexpmule
alexpmule force-pushed the W-23748890-query-badge branch from b131f77 to a5f4386 Compare August 19, 2026 18:28
…el, bump generator to 0.4.0

Bump @api-components/api-model-generator ^0.2.14 -> ^0.4.0 (amf-client-js 5.11
supports OAS 3.1/3.2). Add a real OAS 3.2 demo spec exercising the QUERY method
and register it so prepare generates its model. Make test/amf-loader.js
@graph-aware (amf-client-js 5.11 emits flattened @graph models) and split the
method-label suite so QUERY asserts against the generated model. COPY/MOVE stay
inline with a comment: AMF 5.11 does not parse copy/move from an OAS 3.2 pathItem.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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