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

Generate deprecated tags and annotations #41

Open
algochoi opened this issue Sep 13, 2022 · 0 comments
Open

Generate deprecated tags and annotations #41

algochoi opened this issue Sep 13, 2022 · 0 comments
Labels
new-feature-request Feature request that needs triage Team Lamprey

Comments

@algochoi
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature-request Feature request that needs triage Team Lamprey
Projects
None yet
Development

No branches or pull requests

2 participants