Skip to content

Feature request: Mark property as deprecated #319

@josmithua

Description

@josmithua

The OpenAPI spec supports a deprecated flag on schema properties:

UserResponse:
    type: object
    properties:
      Nme:
        type: string
        description: The name of the user
        deprecated: true
      Name:
        type: string
        description: The name of the user
      Id:
        type: string
        description: The id of the user (GUID)

It would be great if the OpenApiPropertyAttribute had a parameter to support this. For example:

class UserResponse
{
    [OpenApiProperty(Description = "The name of the user", Deprecated = true)]
    public string Nam { get; set; }

    [OpenApiProperty(Description = "The name of the user")]
    public string Name { get; set; }

	[OpenApiProperty(Description = "The id of the user (GUID)")]
    public string Id { get; set; }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions