Abdulrehman-PIAIC80387 opened a new pull request, #42265:
URL: https://github.com/apache/superset/pull/42265
### SUMMARY
Fixes #28180.
The 6 `get_export_ids_schema` JSON-Schema dicts (dashboards, charts,
datasets, databases, saved_queries, themes) had no `example` field, so Swagger
UI's "Try it out" defaulted the `q` query parameter to `{}` instead of an array
like `!(1,2,3)`. Executing then hit `parse_rison` which returned a 400 with:
"Not a valid rison schema {} is not of type 'array'"
This made every export endpoint look broken via the docs UI.
Adding `"example": [1, 2, 3]` to each schema gives Swagger UI a concrete
default; "Try it out" now pre-fills the field with a valid array instead of
`{}`. Same one-line addition applied to all 6 identical schemas.
Root cause diagnosis by @rusackas on the issue thread.
### TESTING INSTRUCTIONS
1. Open `/swagger/v1` on a running Superset instance
2. Navigate to any export endpoint (e.g. `GET /api/v1/database/export/`)
3. Click "Try it out"
4. **Before fix:** `q` pre-fills with `{}`, Execute returns 400
5. **After fix:** `q` pre-fills with `[1,2,3]`, Execute returns 200 (or 404
if the IDs don't exist, but not a 400 validation error)
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #28180
- [x] Required feature flags: none
- [x] Changes UI: no
- [x] Includes DB Migration: no
- [x] Includes CLI or Node.js commands: no
- [x] Breaking change: no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]