Skip to content

fix(oas): add missing examples and parameter descriptions for Dashboards and Visualizations APIs#268386

Closed
florent-leborgne wants to merge 1 commit into
mainfrom
fix/oas-missing-examples-descriptions
Closed

fix(oas): add missing examples and parameter descriptions for Dashboards and Visualizations APIs#268386
florent-leborgne wants to merge 1 commit into
mainfrom
fix/oas-missing-examples-descriptions

Conversation

@florent-leborgne
Copy link
Copy Markdown
Member

Summary

Fixes 10 OAS quality issues surfaced by node scripts/validate_oas_docs.js --path /api/dashboards --path /api/visualizations.

All fixes are in the overlays — no generated code was changed by hand.

What was missing

Location Issue
POST /api/dashboardsrequestBody Missing examples
PUT /api/dashboards/{id}requestBody Missing examples
PUT /api/dashboards/{id}responses/201 Missing examples (overlays previously only covered 200)
PUT /api/dashboards/{id} → param id Missing description
POST /api/visualizationsrequestBody Missing examples
PUT /api/visualizations/{id}requestBody Missing examples
PUT /api/visualizations/{id}responses/201 Missing examples (overlays previously only covered 200)
GET /api/visualizations → param fields Missing description
GET /api/visualizations → param search_fields Missing description
POST /api/visualizations → param overwrite Missing description

How each was fixed

  • requestBody examples: Derived from the x-codeSamples payloads already in the same overlays — not invented.
  • responses/201 examples on PUT: Reused the response shape from the corresponding POST 201 examples — PUT-create and POST-create return the same structure.
  • Parameter descriptions: Written to match existing description patterns in the same spec (id description mirrors PUT /api/visualizations/{id}; fields/search_fields/overwrite derived from parameter names and adjacent descriptions already present).

Test plan

  • Run node scripts/validate_oas_docs.js --only traditional --path /api/dashboards --path /api/visualizations — expect Found 0 errors

Made with Cursor

…rds and Visualizations APIs

Fixes 10 OAS validation quality issues found by the validate_oas_docs script:

- Add requestBody examples to POST and PUT for both APIs (derived from
  existing x-codeSamples payloads, not invented)
- Add responses/201 examples to PUT /api/dashboards/{id} and
  PUT /api/visualizations/{id} (the spec defines both 200 and 201;
  overlays previously only covered 200)
- Add description to PUT /api/dashboards/{id} path parameter `id`
  (matches the existing description pattern on the visualizations PUT)
- Add descriptions to GET /api/visualizations parameters `fields` and
  `search_fields`, and POST /api/visualizations parameter `overwrite`

Co-authored-by: Cursor <cursoragent@cursor.com>
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant