villebro commented on code in PR #23655:
URL: https://github.com/apache/superset/pull/23655#discussion_r1164001692


##########
superset/datasets/api.py:
##########
@@ -248,6 +249,59 @@ class DatasetRestApi(BaseSupersetModelRestApi):
     list_outer_default_load = True
     show_outer_default_load = True
 
+    @expose("/<int:pk>", methods=["GET"])
+    @protect()
+    @safe
+    def get(self, pk: int, **kwargs: Any) -> Response:
+        """Get a dataset
+        ---
+        get:
+          description: >-
+            Get a dataset
+          parameters:
+          - in: path
+            schema:
+              type: integer
+            description: The dataset id
+            name: pk
+          responses:
+            200:
+              description: dataset
+              content:
+                application/json:
+                  schema:
+                    type: object

Review Comment:
   Could we add a full schema reference here? Before this change the schema 
looks like this:
   
![image](https://user-images.githubusercontent.com/33317356/231444398-edbccde5-48ea-4d02-aa68-54d377474059.png)
   and after this change it looks like this:
   <img width="1108" alt="image" 
src="https://user-images.githubusercontent.com/33317356/231444464-b3997f48-0e4a-4aac-ac75-d7100961e067.png";>
   
   Check here for an example of how to add the schema:
   
https://github.com/apache/superset/blob/c8fa44e9e904160de705cd643d1df092815348b1/superset/annotation_layers/annotations/api.py#L168-L186
   
   Also, please add `verbose_map` to the schema.



-- 
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: [email protected]

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