Browse Source

ref(api-docs): Refactor requestBody to move example below schema (#21149)

Colleen O'Rourke 4 years ago
parent
commit
bdad08042c

+ 1 - 2
api-docs/paths/events/issue-details.json

@@ -194,8 +194,7 @@
             "properties": {
               "status": {
                 "type": "string",
-                "description": "The new status for the issues. Valid values are `\"resolved\"`, `\"resolvedInNextRelease\"`, `\"unresolved\"`, and `\"ignored\"`.",
-                "example": "unresolved"
+                "description": "The new status for the issues. Valid values are `\"resolved\"`, `\"resolvedInNextRelease\"`, `\"unresolved\"`, and `\"ignored\"`."
               },
               "assignedTo": {
                 "type": "string",

+ 2 - 4
api-docs/paths/events/project-issues.json

@@ -187,8 +187,7 @@
             "properties": {
               "status": {
                 "type": "string",
-                "description": "The new status for the issues. Valid values are `\"resolved\"`, `\"resolvedInNextRelease\"`, `\"unresolved\"`, and `\"ignored\"`.",
-                "example": "unresolved"
+                "description": "The new status for the issues. Valid values are `\"resolved\"`, `\"resolvedInNextRelease\"`, `\"unresolved\"`, and `\"ignored\"`."
               },
               "statusDetails": {
                 "type": "object",
@@ -226,8 +225,7 @@
               },
               "isPublic": {
                 "type": "boolean",
-                "description": "Sets the issue to public or private.",
-                "example": false
+                "description": "Sets the issue to public or private."
               },
               "merge": {
                 "type": "boolean",

+ 6 - 4
api-docs/paths/organizations/details.json

@@ -248,15 +248,17 @@
             "properties": {
               "name": {
                 "type": "string",
-                "description": "An optional new name for the organization.",
-                "example": "Impeccably Designated"
+                "description": "An optional new name for the organization."
               },
               "slug": {
                 "type": "string",
-                "description": "An optional new slug for the organization. Needs to be available and unique.",
-                "example": "impeccably-designated"
+                "description": "An optional new slug for the organization. Needs to be available and unique."
               }
             }
+          },
+          "example": {
+            "name": "Impeccably Designated",
+            "slug": "impeccably-designated"
           }
         }
       },

+ 6 - 9
api-docs/paths/projects/details.json

@@ -221,23 +221,19 @@
             "properties": {
               "name": {
                 "type": "string",
-                "description": "The new name for the project.",
-                "example": "Plane Proxy"
+                "description": "The new name for the project."
               },
               "slug": {
                 "type": "string",
-                "description": "The new slug for the project.",
-                "example": "plane-proxy"
+                "description": "The new slug for the project."
               },
               "team": {
                 "type": "string",
-                "description": "The slug of new team for the project. Note, will be deprecated soon when multiple teams can have access to a project.",
-                "example": "the-inflated-philosophers"
+                "description": "The slug of new team for the project. Note, will be deprecated soon when multiple teams can have access to a project."
               },
               "platform": {
                 "type": "string",
-                "description": "The new platform for the project.",
-                "example": "javascript"
+                "description": "The new platform for the project."
               },
               "isBookmarked": {
                 "type": "boolean",
@@ -256,7 +252,8 @@
           "example": {
             "name": "Plane Proxy",
             "platform": "javascript",
-            "slug": "plane-proxy"
+            "slug": "plane-proxy",
+            "team": "the-inflated-philosophers"
           }
         }
       },

+ 4 - 2
api-docs/paths/projects/dsyms.json

@@ -77,10 +77,12 @@
               "file": {
                 "type": "string",
                 "format": "binary",
-                "description": "The multipart encoded file.",
-                "example": "debug.zip"
+                "description": "The multipart encoded file."
               }
             }
+          },
+          "example": {
+            "file": "debug.zip"
           }
         }
       },

+ 1 - 1
api-docs/paths/projects/index.json

@@ -2,7 +2,7 @@
   "get": {
     "tags": ["Projects"],
     "description": "Return a list of projects available to the authenticated session.",
-    "operationId": "List your Projects",
+    "operationId": "List Your Projects",
     "parameters": [
       {
         "$ref": "../../components/parameters/pagination-cursor.json#/PaginationCursor"

+ 4 - 2
api-docs/paths/projects/key-details.json

@@ -40,10 +40,12 @@
             "properties": {
               "name": {
                 "type": "string",
-                "description": "The new name for the client key.",
-                "example": "Fluffy Key"
+                "description": "The new name for the client key."
               }
             }
+          },
+          "example": {
+            "name": "Fluffy Key"
           }
         }
       },

+ 4 - 2
api-docs/paths/projects/keys.json

@@ -111,10 +111,12 @@
             "properties": {
               "name": {
                 "type": "string",
-                "description": "The name for the new key.",
-                "example": "Fabulous Key"
+                "description": "The name for the new key."
               }
             }
+          },
+          "example": {
+            "name": "Fabulous Key"
           }
         }
       },

+ 7 - 5
api-docs/paths/projects/service-hook-details.json

@@ -46,7 +46,7 @@
               "id": "4f9d73e63b7144ecb8944c41620a090b",
               "secret": "8fcac28aaa4c4f5fa572b61d40a8e084364db25fd37449c299e5a41c0504cbc2",
               "status": "active",
-              "url": "https://example.com/sentry-hook"
+              "url": "https://empowerplant.io/sentry-hook"
             }
           }
         }
@@ -106,18 +106,20 @@
             "properties": {
               "url": {
                 "type": "string",
-                "description": "The URL for the webhook.",
-                "example": "https://example.com/sentry-hook"
+                "description": "The URL for the webhook."
               },
               "events": {
                 "type": "array",
                 "description": "The events to subscribe to.",
-                "example": ["event.alert", "event.created"],
                 "items": {
                   "type": "string"
                 }
               }
             }
+          },
+          "example": {
+            "url": "https://empowerplant.io/sentry-hook",
+            "events": ["event.alert", "event.created"]
           }
         }
       },
@@ -137,7 +139,7 @@
               "id": "4f9d73e63b7144ecb8944c41620a090b",
               "secret": "8fcac28aaa4c4f5fa572b61d40a8e084364db25fd37449c299e5a41c0504cbc2",
               "status": "active",
-              "url": "https://example.com/sentry-hook"
+              "url": "https://empowerplant.io/sentry-hook"
             }
           }
         }

+ 7 - 5
api-docs/paths/projects/service-hooks.json

@@ -44,7 +44,7 @@
                 "id": "4f9d73e63b7144ecb8944c41620a090b",
                 "secret": "8fcac28aaa4c4f5fa572b61d40a8e084364db25fd37449c299e5a41c0504cbc2",
                 "status": "active",
-                "url": "https://example.com/sentry-hook"
+                "url": "https://empowerplant.io/sentry-hook"
               }
             ]
           }
@@ -93,18 +93,20 @@
             "properties": {
               "url": {
                 "type": "string",
-                "description": "The URL for the webhook.",
-                "example": "https://example.com/sentry-hook"
+                "description": "The URL for the webhook."
               },
               "events": {
                 "type": "array",
                 "description": "The events to subscribe to.",
-                "example": ["event.alert", "event.created"],
                 "items": {
                   "type": "string"
                 }
               }
             }
+          },
+          "example": {
+            "url": "https://empowerplant.io/sentry-hook",
+            "events": ["event.alert", "event.created"]
           }
         }
       },
@@ -124,7 +126,7 @@
               "id": "4f9d73e63b7144ecb8944c41620a090b",
               "secret": "8fcac28aaa4c4f5fa572b61d40a8e084364db25fd37449c299e5a41c0504cbc2",
               "status": "active",
-              "url": "https://example.com/sentry-hook"
+              "url": "https://empowerplant.io/sentry-hook"
             }
           }
         }

Some files were not shown because too many files changed in this diff