Skip to content

Commit

Permalink
chore: Migrate /superset/schemas_access_for_file_upload to v1 (#23227)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Medina <diegomedina24@gmail.com>
  • Loading branch information
hughhhh and diegomedina248 committed Mar 15, 2023
1 parent 1874f9a commit 9920ab3
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 55 deletions.
158 changes: 107 additions & 51 deletions docs/static/resources/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1834,10 +1834,10 @@
"type": "string"
},
"last_saved_by": {
"$ref": "#/components/schemas/ChartDataRestApi.get_list.User3"
"$ref": "#/components/schemas/ChartDataRestApi.get_list.User1"
},
"owners": {
"$ref": "#/components/schemas/ChartDataRestApi.get_list.User1"
"$ref": "#/components/schemas/ChartDataRestApi.get_list.User3"
},
"params": {
"nullable": true,
Expand Down Expand Up @@ -1925,16 +1925,11 @@
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"first_name",
"last_name",
"username"
"last_name"
],
"type": "object"
},
Expand Down Expand Up @@ -1972,11 +1967,16 @@
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"first_name",
"last_name"
"last_name",
"username"
],
"type": "object"
},
Expand Down Expand Up @@ -2627,10 +2627,10 @@
"type": "string"
},
"last_saved_by": {
"$ref": "#/components/schemas/ChartRestApi.get_list.User3"
"$ref": "#/components/schemas/ChartRestApi.get_list.User1"
},
"owners": {
"$ref": "#/components/schemas/ChartRestApi.get_list.User1"
"$ref": "#/components/schemas/ChartRestApi.get_list.User3"
},
"params": {
"nullable": true,
Expand Down Expand Up @@ -2718,16 +2718,11 @@
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"first_name",
"last_name",
"username"
"last_name"
],
"type": "object"
},
Expand Down Expand Up @@ -2765,11 +2760,16 @@
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"first_name",
"last_name"
"last_name",
"username"
],
"type": "object"
},
Expand Down Expand Up @@ -3420,7 +3420,7 @@
"readOnly": true
},
"created_by": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.User2"
"$ref": "#/components/schemas/DashboardRestApi.get_list.User1"
},
"created_on_delta_humanized": {
"readOnly": true
Expand All @@ -3446,7 +3446,7 @@
"type": "string"
},
"owners": {
"$ref": "#/components/schemas/DashboardRestApi.get_list.User1"
"$ref": "#/components/schemas/DashboardRestApi.get_list.User2"
},
"position_json": {
"nullable": true,
Expand Down Expand Up @@ -3520,10 +3520,6 @@
},
"DashboardRestApi.get_list.User1": {
"properties": {
"email": {
"maxLength": 64,
"type": "string"
},
"first_name": {
"maxLength": 64,
"type": "string"
Expand All @@ -3535,22 +3531,20 @@
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"email",
"first_name",
"last_name",
"username"
"last_name"
],
"type": "object"
},
"DashboardRestApi.get_list.User2": {
"properties": {
"email": {
"maxLength": 64,
"type": "string"
},
"first_name": {
"maxLength": 64,
"type": "string"
Expand All @@ -3562,11 +3556,17 @@
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"email",
"first_name",
"last_name"
"last_name",
"username"
],
"type": "object"
},
Expand Down Expand Up @@ -4293,6 +4293,18 @@
},
"type": "object"
},
"DatabaseSchemaAccessForFileUploadResponse": {
"properties": {
"schemas": {
"description": "The list of schemas allowed for the database to upload information",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"DatabaseTablesResponse": {
"properties": {
"extra": {
Expand Down Expand Up @@ -4917,7 +4929,7 @@
"$ref": "#/components/schemas/DatasetRestApi.get.TableColumn"
},
"created_by": {
"$ref": "#/components/schemas/DatasetRestApi.get.User2"
"$ref": "#/components/schemas/DatasetRestApi.get.User1"
},
"created_on": {
"format": "date-time",
Expand Down Expand Up @@ -4981,7 +4993,7 @@
"type": "integer"
},
"owners": {
"$ref": "#/components/schemas/DatasetRestApi.get.User1"
"$ref": "#/components/schemas/DatasetRestApi.get.User2"
},
"schema": {
"maxLength": 255,
Expand Down Expand Up @@ -5195,23 +5207,14 @@
"maxLength": 64,
"type": "string"
},
"id": {
"format": "int32",
"type": "integer"
},
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"first_name",
"last_name",
"username"
"last_name"
],
"type": "object"
},
Expand All @@ -5221,14 +5224,23 @@
"maxLength": 64,
"type": "string"
},
"id": {
"format": "int32",
"type": "integer"
},
"last_name": {
"maxLength": 64,
"type": "string"
},
"username": {
"maxLength": 64,
"type": "string"
}
},
"required": [
"first_name",
"last_name"
"last_name",
"username"
],
"type": "object"
},
Expand Down Expand Up @@ -6971,7 +6983,7 @@
"type": "integer"
},
"created_by": {
"$ref": "#/components/schemas/ReportScheduleRestApi.get_list.User2"
"$ref": "#/components/schemas/ReportScheduleRestApi.get_list.User1"
},
"created_on": {
"format": "date-time",
Expand Down Expand Up @@ -7021,7 +7033,7 @@
"type": "string"
},
"owners": {
"$ref": "#/components/schemas/ReportScheduleRestApi.get_list.User1"
"$ref": "#/components/schemas/ReportScheduleRestApi.get_list.User2"
},
"recipients": {
"$ref": "#/components/schemas/ReportScheduleRestApi.get_list.ReportRecipients"
Expand Down Expand Up @@ -7082,10 +7094,6 @@
"maxLength": 64,
"type": "string"
},
"id": {
"format": "int32",
"type": "integer"
},
"last_name": {
"maxLength": 64,
"type": "string"
Expand All @@ -7103,6 +7111,10 @@
"maxLength": 64,
"type": "string"
},
"id": {
"format": "int32",
"type": "integer"
},
"last_name": {
"maxLength": 64,
"type": "string"
Expand Down Expand Up @@ -15301,6 +15313,50 @@
]
}
},
"/api/v1/database/{pk}/schemas_access_for_file_upload/": {
"get": {
"parameters": [
{
"in": "path",
"name": "pk",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DatabaseSchemaAccessForFileUploadResponse"
}
}
},
"description": "The list of the database schemas where to upload information"
},
"401": {
"$ref": "#/components/responses/401"
},
"404": {
"$ref": "#/components/responses/404"
},
"500": {
"$ref": "#/components/responses/500"
}
},
"security": [
{
"jwt": []
}
],
"summary": "The list of the database schemas where to upload information",
"tags": [
"Database"
]
}
},
"/api/v1/database/{pk}/select_star/{table_name}/": {
"get": {
"description": "Get database select star for table",
Expand Down
1 change: 1 addition & 0 deletions superset/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class RouteMethod: # pylint: disable=too-few-public-methods
"delete_ssh_tunnel": "write",
"get_updated_since": "read",
"stop_query": "read",
"schemas_access_for_file_upload": "read",
"get_objects": "read",
"get_all_objects": "read",
"add_objects": "write",
Expand Down
Loading

0 comments on commit 9920ab3

Please sign in to comment.