Add missing OpenAPI examples for SLO endpoints#259859
Add missing OpenAPI examples for SLO endpoints#259859jasonrhodes wants to merge 7 commits intoelastic:mainfrom
Conversation
Adds request body and response examples to all 12 public SLO API operations, covering all 57 previously missing example entries in the OpenAPI spec. Includes realistic examples for success responses, error responses (400/401/403/404/409), and request bodies for create, update, bulk delete, bulk purge, and delete instances. Made-with: Cursor
|
Pinging @elastic/actionable-obs-team (Team:actionable-obs) |
ApprovabilityVerdict: Would Approve This PR adds OpenAPI documentation examples for SLO endpoints with no runtime code changes. All modifications are to API specification files adding example requests/responses and fixing error response descriptions. The open review comments are minor nitpicks about example data consistency. Macroscope would have approved this PR. A repo admin can enable approvability here. |
| summary: Forbidden | ||
| value: | ||
| statusCode: 403 | ||
| error: Unauthorized |
There was a problem hiding this comment.
nit: should be Forbidden
There was a problem hiding this comment.
Good catch, not a nit!
| value: | ||
| page: 1 | ||
| perPage: 25 | ||
| total: 2 |
There was a problem hiding this comment.
ocd: total 2 but only 1 result 😅
There was a problem hiding this comment.
Would total here be the total SLOs or the total number of pages available? I'm not sure
Made-with: Cursor
The 403_response.yaml component schema had title and error example set to 'Unauthorized' instead of 'Forbidden'. Also fixes the description on all 403 response entries in path files from 'Unauthorized response' to 'Forbidden response'. This was a pre-existing bug in the SLO OAS spec, not introduced by this PR. Made-with: Cursor
Made-with: Cursor
bfb2ee4 to
469684c
Compare
💚 Build Succeeded
Metrics [docs]
|
Closes #259854
Summary
Adds missing
examplesto all 12 public SLO API operations in the hand-written OpenAPI spec, covering all 57 previously missing example entries.What was missing:
What was added:
Files changed:
x-pack/solutions/observability/plugins/slo/docs/openapi/slo/paths/bundled.jsonandbundled.yamlValidation:
swagger-cli validate entrypoint.yamlpasses@redocly/cli bundlesucceedsChecklist
release_note:*label is applied per the guidelinesRisk Matrix
Made with Cursor