bkyryliuk commented on a change in pull request #10266:
URL: 
https://github.com/apache/incubator-superset/pull/10266#discussion_r454599917



##########
File path: superset/datasets/api.py
##########
@@ -476,3 +479,68 @@ def related_objects(self, pk: int) -> Response:
             charts={"count": len(charts), "result": charts},
             dashboards={"count": len(dashboards), "result": dashboards},
         )
+
+    @expose(
+        "/explore/<int:database_id>/<datasource_type>/<datasource_name>/",
+        methods=["GET"],
+    )
+    @protect()
+    @safe
+    @statsd_metrics
+    def explore(
+        self, database_id: int, datasource_type: str, datasource_name: str
+    ) -> Union[Response, WerkZeugResponse]:
+        """Find or create and explore the dataset
+        ---
+        get:
+          description: >-
+            Finds or creates a datasource definition and redirects to the 
explore view.
+            Only table datasources are currently supported.
+          parameters:
+          - in: path
+            name: database_id
+            schema:
+              type: integer
+          - in: path
+            name: datasource_type
+            schema:
+              type: string
+          - in: path
+            name: datasource_name
+            schema:
+              type: string
+          responses:
+            302:
+              description: redirect to the superset explore
+            400:
+              $ref: '#/components/responses/400'
+            401:
+              $ref: '#/components/responses/401'
+            404:
+              $ref: '#/components/responses/404'
+            500:
+              $ref: '#/components/responses/500'

Review comment:
       @villebro there is no schema for the response and it will be either a 
redirect or an error code
   I haven't used marshmallow schema before, can I use it for the url params ?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to