-
Notifications
You must be signed in to change notification settings - Fork 136
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 Description from @schema/desc
annotation
#469
Comments
Reviewing this story with the team, got some feedback. Need to update the story to address these questions:
done ✅ |
@schema/doc
annotation@schema/desc
annotation
re: Observations:
Suggestion:
|
That is a great idea, I created an issue to talk through your suggestion more #539 @pivotaljohn |
Updated the acceptance criteria to change if a data values schema is annotated at the document level:
then it applies to the section immediately following the |
Available in v0.38.0 |
As a Configuration Author
I want to generate an Openapi description key from my configuration annotations
so that Configuration Consumers see what the key's purpose is.
🟢 Scenario 1:
@schema/desc
annotation creates adescription
key for an mapGiven the following schema exists
When I execute
ytt -f schema.yml --data-values-schema-inspect -o openapi-v3
Then I should see on my screen
🟢 Scenario 2:
@schema/desc
annotation creates adescription
key for an arrayGiven the following schema exists
When I execute
ytt -f schema.yml --data-values-schema-inspect -o openapi-v3
Then I should see a description on the ARRAY
🟢 Scenario 3:
@schema/desc
annotation creates adescription
key for an array itemGiven the following schema exists
When I execute
ytt -f schema.yml --data-values-schema-inspect -o openapi-v3
Then I should see a description on the MAP
💚 Scenario 4:
@schema/desc
annotation is added to the description of the schema UPDATEDGiven the following schema exists
When I execute
ytt -f schema.yml --data-values-schema-inspect -o openapi-v3
Then no description is added
Reasoning for placing the description there instead of in the
info
object: a Document in ytt is a map, this corresponds to the 'object' under thecomponents.schemas
section in the OpenAPI doc. Because of that, annotating a Document should apply that annotation to that level in an OpenAPI Doc.🔴 Scenario 5: When value is any type other than a string
Given the following schema exists
When I execute
ytt -f schema.yml --data-values-schema-inspect -o openapi-v3
Then I see an error (similar to overlay errors) that the value must be a string
🔴 Scenario 6: When value is any type other than a string
Given the following schema exists
When I execute
ytt -f schema.yml --data-values-schema-inspect -o openapi-v3
Then I see an error (similar to overlay errors) that the value must be one string
Excerpt from the proposed Schema documentation
@schema/desc documentation
Sets the text describing the purpose of the node.
documentation
(string
) — a more thorough description of the node or section that shares the contextof the node, enumerates the range of possible values, explaining the effects of certain value ranges.
values in documentation settings.
Links:
The text was updated successfully, but these errors were encountered: