Documentation
¶
Overview ¶
Package openapicompat contains normalization used only by the OpenAPI compatibility gate. It does not alter runtime request or response behavior.
Index ¶
- func CheckSecuritySchemes(base, revision io.Reader) error
- func CheckStableSDKSurface(base, revision io.Reader) error
- func CheckStableSDKSurfaceWithAllowedSchemaCorrections(base, revision io.Reader, allowedDemotions, allowedRemovals []string) error
- func CheckStableSDKSurfaceWithAllowedSchemaDemotions(base, revision io.Reader, allowedDemotions []string) error
- func NormalizeStability(r io.Reader, w io.Writer) error
- func PruneExportInterior(r io.Reader, w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSecuritySchemes ¶
CheckSecuritySchemes rejects any semantic change to the authentication scheme definitions. oasdiff detects scheme additions/removals but does not currently detect fields such as HTTP scheme or API-key name/location.
func CheckStableSDKSurface ¶
CheckStableSDKSurface protects OpenAPI names that are part of generated SDK APIs but are not treated as wire-level breaking changes by oasdiff.
The inputs must already have passed NormalizeStability and PruneExportInterior. That makes the canonical beta marker authoritative and preserves the account export's versioned-interior exemption.
func CheckStableSDKSurfaceWithAllowedSchemaCorrections ¶
func CheckStableSDKSurfaceWithAllowedSchemaCorrections(base, revision io.Reader, allowedDemotions, allowedRemovals []string) error
CheckStableSDKSurfaceWithAllowedSchemaCorrections permits exact, reviewed pre-GA lifecycle corrections while leaving the default stable SDK freeze strict. Removal exceptions are narrower than demotions and must only name generated models intentionally retired before the announced GA tag.
func CheckStableSDKSurfaceWithAllowedSchemaDemotions ¶
func CheckStableSDKSurfaceWithAllowedSchemaDemotions(base, revision io.Reader, allowedDemotions []string) error
CheckStableSDKSurfaceWithAllowedSchemaDemotions applies the same stable SDK freeze while permitting an explicit, exact set of schema lifecycle corrections. Callers should use this only when a schema landed after the latest release with a missing beta marker; the default check remains strict.
func NormalizeStability ¶
NormalizeStability maps e2a's historical experimental marker into the canonical lifecycle extension understood by oasdiff. Older release specs can therefore be compared with newer specs without misclassifying beta APIs as stable.
func PruneExportInterior ¶
PruneExportInterior rewrites an OpenAPI document for the compatibility gate: the account export's versioned-interior schemas are collapsed to `{type: object, additionalProperties: true, x-stability-level: beta}`. A document with no UserExport component passes through semantically unchanged. Like NormalizeStability, this never alters runtime behavior — it only feeds oasdiff.
Types ¶
This section is empty.