You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openapi: a promotion mapping can't say which extension values state the fact #654
Extensions that state openness often do it with a value: allow or disallow, true or false, or a small vocabulary. extensionOpenness (compilers/openapi/internal/lowering/promotion.go:235) treats any value that isn't a boolean as "open":
Status compiles to closed: false with inferred: extension-promotion: the document said the opposite. A caller has no way to state which values mean open, and nothing reports a value the mapping doesn't understand.
Proposal
Let a mapping entry name the values that state the fact, for example {target: enum.open, when: [allow]}, and report any other value instead of reading it. The rule of docs/compilers/openapi.md#extension-promotion that a value the field can't hold is reported and not coerced then covers these keys too.
#1229 adds an instance on another target. TargetDeprecation takes the text deprecated or a boolean true, which is right for a key meaning only that, and the two stability keys are read as sources of it for their word deprecated. A mapping cannot narrow a source to that word, so x-stability: true creates a Deprecation, marked extension-promotion, with nothing reported, where the document likely means something else.
The value set this issue proposes would settle it. The golden spec writes no boolean under either key: x-stability is beta 280 times and stable twice (spec @319dc756). docs/compilers/openapi.md#extension-promotion names this in its Status.
Activity
docs: state each limit of a promotion where it lives
OmarAlJarrah commentedon Nov 1, 2026
#1229 adds an instance on another target.
TargetDeprecationtakes the textdeprecatedor a booleantrue, which is right for a key meaning only that, and the two stability keys are read as sources of it for their worddeprecated. A mapping cannot narrow a source to that word, sox-stability: truecreates aDeprecation, markedextension-promotion, with nothing reported, where the document likely means something else.The value set this issue proposes would settle it. The golden spec writes no boolean under either key:
x-stabilityisbeta280 times andstabletwice (spec @319dc756).docs/compilers/openapi.md#extension-promotionnames this in its Status.