-
Notifications
You must be signed in to change notification settings - Fork 348
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
feat: @Maturity annotation for endpoints #17701
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice initiative @jbee 👍
I just left some comments. Have a look if they make any sense.
Cheers
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Maturity.java
Outdated
Show resolved
Hide resolved
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Maturity.java
Outdated
Show resolved
Hide resolved
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Maturity.java
Outdated
Show resolved
Hide resolved
Nice initiative Jan. I like the idea of bringing more clarity/intention to the APIs 👍 |
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Maturity.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
This is a good initiative. I think flowchart LR
EXPERIMENTAL --> removed
EXPERIMENTAL --> STABLE
STABLE --> DEPRECATED
DEPRECATED --> removed
|
@amcgee deprecated is a individual flag that already exists in form of |
enum Classification { | ||
/** | ||
* The API is stable and rarely subject to change. Change management occurs. Once an API is | ||
* declared stable it does not change to another classification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text may be a bit misleading to some. It might not technically move to another Classification
value but it could still move to Deprecated
. This needs to be clear, whether that's in the code or the external publication or both. No harm mentioning it here I think.
Summary
A new annotation that can be used in controllers to indicate the maturity of endpoints (methods) and/or individual endpoint parameters.
This is a first step for a long term goal for better documentation and the ability for the dev team to classify the API so that it is clear what conditions apply for users of the APIs.
For now the annotation is picked up by OpenAPI and rendered into the document as
x-maturity
. Suchx-
properties can be added to OpenAPI freely for additional information. It does not have any effect unless a tool specifically supports such additional properties.Besides OpenAPI the maturity information might prove useful in other contexts.