Add a way to pass database context as header from swagger UI#12695
Add a way to pass database context as header from swagger UI#12695gortiz merged 2 commits intoapache:masterfrom
database context as header from swagger UI#12695Conversation
gortiz
left a comment
There was a problem hiding this comment.
LGTM, just a note: do you think it may be useful to set the description attribute in ApiKeyAuthDefinition to indicate this is the database that will be used by default? Or do you think it is going to be repetitive?
That's a great suggestion! Extra info won't hurt imo |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12695 +/- ##
============================================
- Coverage 61.75% 61.55% -0.20%
+ Complexity 207 198 -9
============================================
Files 2436 2456 +20
Lines 133233 134400 +1167
Branches 20636 20803 +167
============================================
+ Hits 82274 82733 +459
- Misses 44911 45489 +578
- Partials 6048 6178 +130
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
This is a best effort attempt to allow passing database context as http header to perform table/schema specific requests.

The approach piggy backs on the
@AuthorizationAPI on swagger to inject the database header disguised as API Auth key.Post this change the swagger UI will have an option to set the database context once and use it throughout all operations.
Input screen will look like
Related resources
Databasesupport in Pinot #12333databasehttp header #12417