Skip to content

Add obsolete guidance for OAS 3.2 deprecated properties #2972

Description

@baywet

Context

OAS 3.2.0 marks several fields/features as deprecated. This issue tracks the OpenAPI.NET object model updates needed for deprecated specification properties, while intentionally excluding the deprecated boolean flags that users can set on individual OpenAPI description instances.

Specification: https://spec.openapis.org/oas/v3.2.0.html

Excluded from model obsoletion

Do not add [Obsolete] for the deprecated boolean properties themselves. These remain valid user-authored flags for indicating an instance is deprecated:

Object Property
Operation Object deprecated
Parameter Object deprecated
Header Object deprecated
Security Scheme Object deprecated

Properties to mark obsolete

Add [Obsolete] attributes to guide users toward the updated replacements:

Object Deprecated property Guidance / replacement
Parameter Object allowEmptyValue Use is not recommended by OAS 3.2.0 and it is likely to be removed in a later revision.
Schema Object example Use JSON Schema examples instead.
XML Object attribute Use nodeType: "attribute" instead.
XML Object wrapped Use nodeType: "element" instead.

Conditional deprecation note

The Example Object value field is deprecated only for non-JSON serialization targets. Since the deprecation is conditional, updating the object model would create noise for scenarios where value is still valid. Do not add [Obsolete] for this property.

Acceptance criteria

  • Deprecated OAS 3.2.0 properties listed above have [Obsolete] attributes in the object model with actionable replacement guidance.
  • Boolean deprecated instance flags are left unchanged.
  • Example Object value is left unchanged, with no object model obsoletion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions