-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Adds 'discontinued' to OAS meta #192331
Adds 'discontinued' to OAS meta #192331
Conversation
@elasticmachine merge upstream |
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.
Self review
packages/kbn-router-to-openapispec/src/process_versioned_router.ts
Outdated
Show resolved
Hide resolved
...to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts
Outdated
Show resolved
Hide resolved
...to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts
Outdated
Show resolved
Hide resolved
…g_schema/post_process_mutations/mutations/utils.ts fix discontinued value Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
@elasticmachine merge upstream |
Pinging @elastic/kibana-core (Team:Core) |
@elasticmachine merge upstream |
packages/kbn-router-to-openapispec/src/__snapshots__/generate_oas.test.ts.snap
Outdated
Show resolved
Hide resolved
...to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
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.
Great job @TinaHeiligers , left a few nits up to you, otherwise looks good to go!
* | ||
* @remarks This will be surfaced in OAS documentation. | ||
*/ | ||
'x-discontinued'?: string; |
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.
Nit: What do you think about defining route definitions and kbn/config-schema meta as { discontinued: '...' }
instead of { 'x-discontinued': '...' }
. Just saves a few keystrokes and slightly awkward string syntax 'my-field-name'
. Then when we render it out we just map it to x-discontinued
.
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.
I prefer consistency with the final output but can add a brief explanation to the field's description.
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.
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
💚 Build Succeeded
Metrics [docs]Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
## Summary In this PR, we add support for a discontinued field to our router conversion logic at the operation level. `discontinued` indicates the version or date when the deprecation will be removed, as a string. Closes elastic#192292 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com> (cherry picked from commit 303d8f2)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [Adds 'discontinued' to OAS meta (#192331)](#192331) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christiane (Tina) Heiligers","email":"christiane.heiligers@elastic.co"},"sourceCommit":{"committedDate":"2024-09-13T00:06:41Z","message":"Adds 'discontinued' to OAS meta (#192331)\n\n## Summary\r\n\r\nIn this PR, we add support for a discontinued field to our router\r\nconversion logic at the operation level. `discontinued` indicates the\r\nversion or date when the deprecation will be removed, as a string.\r\n\r\nCloses https://github.com/elastic/kibana/issues/192292\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"303d8f27e4c8cdfd541e7e6b27548cbffaf454fd","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:http","Team:Core","release_note:skip","v9.0.0","Feature:OAS","v8.16.0"],"title":"Adds 'discontinued' to OAS meta","number":192331,"url":"https://github.com/elastic/kibana/pull/192331","mergeCommit":{"message":"Adds 'discontinued' to OAS meta (#192331)\n\n## Summary\r\n\r\nIn this PR, we add support for a discontinued field to our router\r\nconversion logic at the operation level. `discontinued` indicates the\r\nversion or date when the deprecation will be removed, as a string.\r\n\r\nCloses https://github.com/elastic/kibana/issues/192292\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"303d8f27e4c8cdfd541e7e6b27548cbffaf454fd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192331","number":192331,"mergeCommit":{"message":"Adds 'discontinued' to OAS meta (#192331)\n\n## Summary\r\n\r\nIn this PR, we add support for a discontinued field to our router\r\nconversion logic at the operation level. `discontinued` indicates the\r\nversion or date when the deprecation will be removed, as a string.\r\n\r\nCloses https://github.com/elastic/kibana/issues/192292\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"303d8f27e4c8cdfd541e7e6b27548cbffaf454fd"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
In this PR, we add support for a discontinued field to our router conversion logic at the operation level.
discontinued
indicates the version or date when the deprecation will be removed, as a string.Closes #192292