Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(api): Improve api documentation for dashboard endpoints(filter_state, permalink, embedded) #32142

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

msyavuz
Copy link
Contributor

@msyavuz msyavuz commented Feb 5, 2025

SUMMARY

Add examples to filter_state and permalink endpoints and add parameters to embedded endpoint.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:
image
image
image

Note

Endpoint for filter_state accepts the body in the form of { "value": "stringified json" }. I documented the endpoint with actual json object and specified that it should be stringified and put into value field of the body in the examples. Other approach would be to just put the stringified example there which makes it unreadable but is more reflective.

TESTING INSTRUCTIONS

Go to local instance of swagger ui at /swagger/v1 and check for the documentation.

ADDITIONAL INFORMATION

  • Has associated issue: Fixes Improve Swagger For Dashboard Filter State & Permalink #32046
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@github-actions github-actions bot added the api Related to the REST API label Feb 5, 2025
@dosubot dosubot bot added the doc Namespace | Anything related to documentation label Feb 5, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Fix Detected
Functionality Incorrect numerical range in filter example ▹ view
Documentation Unclear API Summary ▹ view

Need a new review? Comment /korbit-review on this PR and I'll review your latest changes.

Korbit Guide: Usage and Customization

Interacting with Korbit

  • You can manually ask Korbit to review your PR using the /korbit-review command in a comment at the root of your PR.
  • You can ask Korbit to generate a new PR description using the /korbit-generate-pr-description command in any comment on your PR.
  • Too many Korbit comments? I can resolve all my comment threads if you use the /korbit-resolve command in any comment on your PR.
  • Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
  • Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.

Customizing Korbit

  • Check out our docs on how you can make Korbit work best for you and your team.
  • Customize Korbit for your organization through the Korbit Console.

Feedback and Support

superset/dashboards/filter_state/api.py Outdated Show resolved Hide resolved
@@ -71,13 +71,38 @@ def get(self, uuid: str) -> Response:
"""Get the dashboard's embedded configuration.
---
get:
summary: Get the dashboard's embedded configuration
summary: Get the dashboard's embedded configuration this endpoint is also used to embed dashboards.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclear API Summary category Documentation

Tell me more
What is the issue?

The summary is unclear and contains redundant information. The phrase 'this endpoint is also used to embed dashboards' is confusing and doesn't add value.

Why this matters

Unclear API documentation makes it harder for developers to understand the endpoint's primary purpose and can lead to misuse.

Suggested change ∙ Feature Preview
      summary: Get configuration and renders dashboard for embedding

Report a problem with this comment

💬 Chat with Korbit by mentioning @korbit-ai.

Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.46%. Comparing base (76d897e) to head (7ef74fe).
Report is 1405 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #32142       +/-   ##
===========================================
+ Coverage   60.48%   83.46%   +22.98%     
===========================================
  Files        1931      545     -1386     
  Lines       76236    39042    -37194     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    32588    -13526     
+ Misses      28017     6454    -21563     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive 48.49% <ø> (-0.67%) ⬇️
javascript ?
mysql 75.87% <ø> (?)
postgres 75.94% <ø> (?)
presto 53.03% <ø> (-0.77%) ⬇️
python 83.46% <ø> (+19.98%) ⬆️
sqlite 75.45% <ø> (?)
unit 61.01% <ø> (+3.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot removed the doc Namespace | Anything related to documentation label Feb 5, 2025
@geido geido added the preset:bounty Issues that have been selected by Preset and have a bounty attached. label Feb 5, 2025
@michael-s-molina
Copy link
Member

Thanks for the great docs @msyavuz! Can we remove the embedded_dashboard folder given that it's empty?

Tagging some folks that might know if that folder is needed. @Vitor-Avila @betodealmeida

@msyavuz
Copy link
Contributor Author

msyavuz commented Feb 5, 2025

No problem! As far as i know git doesn't deal with directories so it should be out of index already since its empty? Just need to run git clean -fd locally

@@ -1,16 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reasons for deleting this? Can you bring it back?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be used by some organizations so we don't want to delete it if it is not necessary

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this folder is used, it would be good to add some comment or README file. Empty folders can be deleted at any time during cleanup efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the REST API preset:bounty Issues that have been selected by Preset and have a bounty attached. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Swagger For Dashboard Filter State & Permalink
3 participants