[Fleet] Fix Fleet OAS errors#265831
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
ApprovabilityVerdict: Would Approve Documentation-only changes adding description metadata to Fleet API schema definitions for OpenAPI spec generation. No runtime behavior is modified - this purely fixes OAS validation errors by adding missing parameter descriptions. Macroscope would have approved this PR. A repo admin can enable approvability here. |
vishaangelova
left a comment
There was a problem hiding this comment.
Just a couple of very minor suggestions. LGTM.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
cc @criamico |
|
Starting backport for target branches: 9.4 https://github.com/elastic/kibana/actions/runs/25051507548 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `9.4`: - [[Fleet] Fix Fleet OAS errors (#265831)](#265831) <!--- Backport version: 11.0.2 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Cristina Amico","email":"criamico@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-28T11:59:32Z","message":"[Fleet] Fix Fleet OAS errors (#265831)\n\nRelated to https://github.com/elastic/kibana/issues/259777\n\n## Summary\nAfter the merge of the PRs listed in\nhttps://github.com//issues/259777, there were still many\noutstanding errors in Fleet OAS docs - mostly due to missing\ndescriptions in schemas. This PR fixes those errors in one pass.\nI locally generated the errors with ` node\n./scripts/validate_oas_docs.js`.\n\n- Adds missing description metadata to Fleet API query and path\nparameters across all Fleet REST spec schema files. Without these\ndescriptions, the OAS validator reports errors for each undescribed\nparameter.\n- Also adds application/gzip; application/zip example blocks to the\npackage upload endpoint YAML (`post_install_package_by_upload.yaml`) to\nfix 6 missing-examples validation errors.\n\n### Validation\n- `yarn kbn bootstrap`\n- Run \n```\n- node scripts/capture_oas_snapshot \\\n --include-path /api/fleet\n```\n- `cd oas_docs && make api-docs`\n- Go back on kibana root folder and run ` node\nscripts/validate_oas_docs.js`\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"bcedd4dd0b43bfeca10311afe2a41db47fcce6a4","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:version","v9.4.0","v9.5.0"],"title":"[Fleet] Fix Fleet OAS errors","number":265831,"url":"https://github.com/elastic/kibana/pull/265831","mergeCommit":{"message":"[Fleet] Fix Fleet OAS errors (#265831)\n\nRelated to https://github.com/elastic/kibana/issues/259777\n\n## Summary\nAfter the merge of the PRs listed in\nhttps://github.com//issues/259777, there were still many\noutstanding errors in Fleet OAS docs - mostly due to missing\ndescriptions in schemas. This PR fixes those errors in one pass.\nI locally generated the errors with ` node\n./scripts/validate_oas_docs.js`.\n\n- Adds missing description metadata to Fleet API query and path\nparameters across all Fleet REST spec schema files. Without these\ndescriptions, the OAS validator reports errors for each undescribed\nparameter.\n- Also adds application/gzip; application/zip example blocks to the\npackage upload endpoint YAML (`post_install_package_by_upload.yaml`) to\nfix 6 missing-examples validation errors.\n\n### Validation\n- `yarn kbn bootstrap`\n- Run \n```\n- node scripts/capture_oas_snapshot \\\n --include-path /api/fleet\n```\n- `cd oas_docs && make api-docs`\n- Go back on kibana root folder and run ` node\nscripts/validate_oas_docs.js`\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"bcedd4dd0b43bfeca10311afe2a41db47fcce6a4"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/265831","number":265831,"mergeCommit":{"message":"[Fleet] Fix Fleet OAS errors (#265831)\n\nRelated to https://github.com/elastic/kibana/issues/259777\n\n## Summary\nAfter the merge of the PRs listed in\nhttps://github.com//issues/259777, there were still many\noutstanding errors in Fleet OAS docs - mostly due to missing\ndescriptions in schemas. This PR fixes those errors in one pass.\nI locally generated the errors with ` node\n./scripts/validate_oas_docs.js`.\n\n- Adds missing description metadata to Fleet API query and path\nparameters across all Fleet REST spec schema files. Without these\ndescriptions, the OAS validator reports errors for each undescribed\nparameter.\n- Also adds application/gzip; application/zip example blocks to the\npackage upload endpoint YAML (`post_install_package_by_upload.yaml`) to\nfix 6 missing-examples validation errors.\n\n### Validation\n- `yarn kbn bootstrap`\n- Run \n```\n- node scripts/capture_oas_snapshot \\\n --include-path /api/fleet\n```\n- `cd oas_docs && make api-docs`\n- Go back on kibana root folder and run ` node\nscripts/validate_oas_docs.js`\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"bcedd4dd0b43bfeca10311afe2a41db47fcce6a4"}}]}] BACKPORT-->
Related to elastic#259777 ## Summary After the merge of the PRs listed in elastic#259777, there were still many outstanding errors in Fleet OAS docs - mostly due to missing descriptions in schemas. This PR fixes those errors in one pass. I locally generated the errors with ` node ./scripts/validate_oas_docs.js`. - Adds missing description metadata to Fleet API query and path parameters across all Fleet REST spec schema files. Without these descriptions, the OAS validator reports errors for each undescribed parameter. - Also adds application/gzip; application/zip example blocks to the package upload endpoint YAML (`post_install_package_by_upload.yaml`) to fix 6 missing-examples validation errors. ### Validation - `yarn kbn bootstrap` - Run ``` - node scripts/capture_oas_snapshot \ --include-path /api/fleet ``` - `cd oas_docs && make api-docs` - Go back on kibana root folder and run ` node scripts/validate_oas_docs.js` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Related to #259777
Summary
After the merge of the PRs listed in #259777, there were still many outstanding errors in Fleet OAS docs - mostly due to missing descriptions in schemas. This PR fixes those errors in one pass.
I locally generated the errors with
node ./scripts/validate_oas_docs.js.post_install_package_by_upload.yaml) to fix 6 missing-examples validation errors.Validation
yarn kbn bootstrapcd oas_docs && make api-docsnode scripts/validate_oas_docs.js