You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Abdulrehman-PIAIC80387 (via GitHub)" <gi...@apache.org> on 2026/07/21 08:22:39 UTC

[PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #42265:
URL: https://github.com/apache/superset/pull/42265#issuecomment-5031746206

   ### <span aria-hidden="true">βœ…</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">πŸ”¨</span> Latest commit | 627a7f9e92df511efe605790354b51821496044e |
   |<span aria-hidden="true">πŸ”</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a5f2c5045691e0008459583 |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-42265--superset-docs-preview.netlify.app](https://deploy-preview-42265--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">πŸ“±</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQyMjY1LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.UdK20Zt41eh8oF9jBsZHBfrtE8j3RBYYbbY4Ns6gbuo)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">πŸ€–</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DctLDoAgDADRu3QtsX5q0Bt4DIQaSEQadIEx3l12s3jzguQU5YYFoIEtm9P62nsoLRdJ-VbBXeqynqNRXEyUg1WvO42VO5YjPaurw2Ro7y3hSNPcMSLqkWbSA3w_) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-42265--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42265:
URL: https://github.com/apache/superset/pull/42265#issuecomment-5031774283

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42265?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 56.04%. Comparing base ([`2d3cbc1`](https://app.codecov.io/gh/apache/superset/commit/2d3cbc162e499c79db9f87353b464f7e81482fd1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`627a7f9`](https://app.codecov.io/gh/apache/superset/commit/627a7f9e92df511efe605790354b51821496044e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   > :exclamation:  There is a different number of reports uploaded between BASE (2d3cbc1) and HEAD (627a7f9). Click for more details.
   > 
   > <details><summary>HEAD has 28 uploads less than BASE</summary>
   >
   >| Flag | BASE (2d3cbc1) | HEAD (627a7f9) |
   >|------|------|------|
   >|python|26|1|
   >|presto|4|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #42265      +/-   ##
   ==========================================
   - Coverage   65.27%   56.04%   -9.24%     
   ==========================================
     Files        2769     2769              
     Lines      156339   156339              
     Branches    35787    35787              
   ==========================================
   - Hits       102058    87616   -14442     
   - Misses      52315    67892   +15577     
   + Partials     1966      831    -1135     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Ξ” | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.60% <100.00%> (ΓΈ)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.60% <100.00%> (-18.79%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/42265/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42265?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #42265:
URL: https://github.com/apache/superset/pull/42265#issuecomment-5039538421

   LGTM, this fixes the `{}` rison error from #28180. Same gap exists on `get_delete_ids_schema` and `get_fav_star_ids_schema` (bito flagged it too) though, any interest in a follow-up covering those while you're in here? Would be nice to fix all of that in one shot.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #42265:
URL: https://github.com/apache/superset/pull/42265


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

Posted by "Abdulrehman-PIAIC80387 (via GitHub)" <gi...@apache.org>.
Abdulrehman-PIAIC80387 commented on PR #42265:
URL: https://github.com/apache/superset/pull/42265#issuecomment-5042729151

   Thanks @rusackas β€” extended the PR to cover both `get_delete_ids_schema` (11 more schemas) and `get_fav_star_ids_schema` (2 more), all with the same `"example": [1, 2, 3]` pattern (and `["task_id_1", "task_id_2"]` for `tasks/schemas.py` where items are strings).
   
   Now 12 files / 19 schema definitions total, covering 18 API endpoints (6 export + 10 delete + 2 favorite-status). Force-pushed with the extended change.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42265:
URL: https://github.com/apache/superset/pull/42265#issuecomment-5031732218

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(api): add example to get_export_ids_schema so Swagger "Try it out" pre-fills a valid array [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42265:
URL: https://github.com/apache/superset/pull/42265#issuecomment-5044324066

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org