Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Mark property as deprecated #319

Closed
josmithua opened this issue Nov 18, 2021 · 0 comments · Fixed by #329
Closed

Feature request: Mark property as deprecated #319

josmithua opened this issue Nov 18, 2021 · 0 comments · Fixed by #329
Labels
enhancement New feature or request v1.1.0

Comments

@josmithua
Copy link

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; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants