fix(oas): add missing examples and parameter descriptions for Dashboards and Visualizations APIs#268386
Closed
florent-leborgne wants to merge 1 commit into
Closed
fix(oas): add missing examples and parameter descriptions for Dashboards and Visualizations APIs#268386florent-leborgne wants to merge 1 commit into
florent-leborgne wants to merge 1 commit into
Conversation
…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>
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
POST /api/dashboards→requestBodyexamplesPUT /api/dashboards/{id}→requestBodyexamplesPUT /api/dashboards/{id}→responses/201examples(overlays previously only covered200)PUT /api/dashboards/{id}→ paramiddescriptionPOST /api/visualizations→requestBodyexamplesPUT /api/visualizations/{id}→requestBodyexamplesPUT /api/visualizations/{id}→responses/201examples(overlays previously only covered200)GET /api/visualizations→ paramfieldsdescriptionGET /api/visualizations→ paramsearch_fieldsdescriptionPOST /api/visualizations→ paramoverwritedescriptionHow each was fixed
x-codeSamplespayloads already in the same overlays — not invented.responses/201examples on PUT: Reused the response shape from the corresponding POST201examples — PUT-create and POST-create return the same structure.iddescription mirrorsPUT /api/visualizations/{id};fields/search_fields/overwritederived from parameter names and adjacent descriptions already present).Test plan
node scripts/validate_oas_docs.js --only traditional --path /api/dashboards --path /api/visualizations— expectFound 0 errorsMade with Cursor