fix(cards): use anyOf for nullable Card.stateReason#526
Conversation
The stateReason oneOf is a nullability wrapper (CardStateReason enum or null), not a discriminated union, so it can't carry a discriminator. Switch to anyOf, the standard OpenAPI 3.1 idiom for nullable refs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✱ Stainless preview builds for gridThis PR will update the cli csharp go kotlin openapi php python ruby typescript
|
Merge activity
|
Greptile SummaryFixes the
Confidence Score: 5/5Minimal-risk, one-line schema fix applied consistently across all three spec files — safe to merge. The change is a narrowly scoped correction to a single field combiner keyword across three files that are copies of each other. All three files are updated identically, no behavioral logic changes, and the fix aligns with standard OpenAPI 3.1 semantics for nullable references. No files require special attention.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/cards/Card.yaml | Source-of-truth schema: switches stateReason from oneOf to anyOf for correct nullable-ref semantics in OpenAPI 3.1. |
| openapi.yaml | Bundled OpenAPI spec: applies the same oneOf → anyOf fix, kept in sync with the source schema. |
| mintlify/openapi.yaml | Mintlify docs copy of the spec: applies the same oneOf → anyOf fix, consistent with the other two files. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Card.stateReason value] --> B{Is value null?}
B -- Yes --> C["anyOf: type 'null' ✅ matches"]
B -- No --> D["anyOf: $ref CardStateReason ✅ matches"]
C --> E[Valid — field resolves to null]
D --> F[Valid — field resolves to CardStateReason enum]
style C fill:#c8f7c5
style D fill:#c8f7c5
style E fill:#c8f7c5
style F fill:#c8f7c5
Reviews (1): Last reviewed commit: "fix(cards): use anyOf for nullable Card...." | Re-trigger Greptile

The stateReason oneOf is a nullability wrapper (CardStateReason enum or
null), not a discriminated union, so it can't carry a discriminator.
Switch to anyOf, the standard OpenAPI 3.1 idiom for nullable refs.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com