Skip to content

[Fleet] Fix Fleet OAS errors#265831

Merged
criamico merged 9 commits intoelastic:mainfrom
criamico:fix_fleet_oas_errors
Apr 28, 2026
Merged

[Fleet] Fix Fleet OAS errors#265831
criamico merged 9 commits intoelastic:mainfrom
criamico:fix_fleet_oas_errors

Conversation

@criamico
Copy link
Copy Markdown
Member

@criamico criamico commented Apr 27, 2026

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.

  • 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

@criamico criamico self-assigned this Apr 27, 2026
@criamico criamico added Team:Fleet Team label for Observability Data Collection Fleet team v9.4.0 v9.5.0 backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes labels Apr 27, 2026
@criamico criamico marked this pull request as ready for review April 27, 2026 15:42
@criamico criamico requested a review from a team as a code owner April 27, 2026 15:42
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 27, 2026

Approvability

Verdict: 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.

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod Bot requested a review from a team as a code owner April 27, 2026 16:55
Copy link
Copy Markdown
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Member

@vishaangelova vishaangelova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of very minor suggestions. LGTM.

Comment thread x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent.ts Outdated
Comment thread x-pack/platform/plugins/shared/fleet/server/types/rest_spec/agent.ts Outdated
Comment thread x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts Outdated
Comment thread x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts Outdated
Comment thread x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts Outdated
Comment thread x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts Outdated
Comment thread x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts Outdated
@criamico criamico enabled auto-merge (squash) April 28, 2026 09:41
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @criamico

@criamico criamico merged commit bcedd4d into elastic:main Apr 28, 2026
13 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

https://github.com/elastic/kibana/actions/runs/25051507548

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.4 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.4:
- Fix OAS validation errors in entity analytics privilege monitoring APIs && Risk Score APIs (#265470)
- [OAS] Improve spec descriptions, summaries, examples (#265153)
- [Cases][Docs] - Add additional examples and cleanup to openApi (#263617)
- [Entity Analytics] Add missing OpenAPI descriptions and examples to p… (#264778)

Manual backport

To create the backport manually run:

node scripts/backport --pr 265831

Questions ?

Please refer to the Backport tool documentation

@criamico
Copy link
Copy Markdown
Member Author

💚 All backports created successfully

Status Branch Result
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

criamico added a commit that referenced this pull request Apr 28, 2026
# 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-->
smith pushed a commit to smith/kibana that referenced this pull request Apr 28, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.4.0 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants