Skip to content

feat: prohibit deprecated: true without x-sunset date #7

Description

@msegoviadev

The registry accepts specs that mark operations, parameters, or schema properties as deprecated: true without an x-sunset date. This creates a dead-end lifecycle: the item can never be removed later without --force, because the grace-period engine blocks removal of deprecated items without sunset.

Deprecation and sunset should be declared together. docs/registry/compat-classification.md already treats *-removed-missing-sunset as a blocked state, but the check only runs at removal time, not when the item is first marked deprecated.

Goal: reject specs where deprecated: true appears without a valid x-sunset date at push and validate time.

Expected behavior: POST /v1/specs and POST /v1/specs/:name/validate return 422 with error code missing_sunset_date when any operation, parameter, request body property, or response property is deprecated without x-sunset.

Suggested location: src/registry/parser/openapi/validate.ts, since both push and validate already call it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions