Skip to content

Generate deprecated tags and annotations #41

@algochoi

Description

@algochoi

Problem

We currently cannot add deprecated tags or annotations on generated code. Here are some examples in:

Java

/**
 * Net cost of app execution. Field is DEPRECATED and is subject for removal.
 * Instead, use `budget-added` and `budget-consumed.
 */
@JsonProperty("cost")
public Long cost;

Go

// Cost net cost of app execution. Field is DEPRECATED and is subject for removal.
// Instead, use `budget-added` and `budget-consumed.
Cost uint64 `json:"cost,omitempty"`

It would be nice if there was a way to follow language specific deprecation conventions, i.e. @Deprecated tag for Java and // Deprecated: for Go.

Solution

It looks like the OA3 spec allows the deprecated keyword in its schema, but OA2 does not, so maybe a custom solution is necessary as long as we rely on the OA2 spec.

Urgency

Nice to have - noticed it and writing it down for documentation purposes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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