From ee166a4a0ca187c8e276ce6574680fcffd643147 Mon Sep 17 00:00:00 2001 From: 00Kai0 Date: Thu, 9 Jul 2020 11:20:26 +0800 Subject: [PATCH] add new samples for head,non-string-enum,url-multi-collectionFormat --- swagger/examples/Float_Get.json | 8 ++++++++ swagger/examples/Float_put.json | 10 ++++++++++ swagger/examples/Int_get.json | 8 ++++++++ swagger/examples/Int_put.json | 10 ++++++++++ swagger/examples/httpSuccess_head200.json | 6 ++++++ swagger/examples/httpSuccess_head204.json | 6 ++++++ swagger/examples/httpSuccess_head404.json | 6 ++++++ .../queries_ArrayStringMultiEmpty.json | 8 ++++++++ .../queries_ArrayStringMultiNull.json | 7 +++++++ .../queries_ArrayStringMultiValid.json | 8 ++++++++ swagger/head.json | 15 ++++++++++++++ swagger/non-string-enum.json | 20 +++++++++++++++++++ swagger/url-multi-collectionFormat.json | 15 ++++++++++++++ 13 files changed, 127 insertions(+) create mode 100644 swagger/examples/Float_Get.json create mode 100644 swagger/examples/Float_put.json create mode 100644 swagger/examples/Int_get.json create mode 100644 swagger/examples/Int_put.json create mode 100644 swagger/examples/httpSuccess_head200.json create mode 100644 swagger/examples/httpSuccess_head204.json create mode 100644 swagger/examples/httpSuccess_head404.json create mode 100644 swagger/examples/queries_ArrayStringMultiEmpty.json create mode 100644 swagger/examples/queries_ArrayStringMultiNull.json create mode 100644 swagger/examples/queries_ArrayStringMultiValid.json diff --git a/swagger/examples/Float_Get.json b/swagger/examples/Float_Get.json new file mode 100644 index 00000000..adcebebf --- /dev/null +++ b/swagger/examples/Float_Get.json @@ -0,0 +1,8 @@ +{ + "parameters": {}, + "responses": { + "200": { + "body": 429.1 + } + } +} \ No newline at end of file diff --git a/swagger/examples/Float_put.json b/swagger/examples/Float_put.json new file mode 100644 index 00000000..71d1a335 --- /dev/null +++ b/swagger/examples/Float_put.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "input": 200.4 + }, + "responses": { + "200": { + "body": "Nice job posting a float enum" + } + } +} \ No newline at end of file diff --git a/swagger/examples/Int_get.json b/swagger/examples/Int_get.json new file mode 100644 index 00000000..afe2eb1f --- /dev/null +++ b/swagger/examples/Int_get.json @@ -0,0 +1,8 @@ +{ + "parameters": {}, + "responses": { + "200": { + "body": 429 + } + } +} \ No newline at end of file diff --git a/swagger/examples/Int_put.json b/swagger/examples/Int_put.json new file mode 100644 index 00000000..630d6379 --- /dev/null +++ b/swagger/examples/Int_put.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "input": 200 + }, + "responses": { + "200": { + "body": "Nice job posting an int enum" + } + } +} \ No newline at end of file diff --git a/swagger/examples/httpSuccess_head200.json b/swagger/examples/httpSuccess_head200.json new file mode 100644 index 00000000..e24179d1 --- /dev/null +++ b/swagger/examples/httpSuccess_head200.json @@ -0,0 +1,6 @@ +{ + "parameters": {}, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/swagger/examples/httpSuccess_head204.json b/swagger/examples/httpSuccess_head204.json new file mode 100644 index 00000000..5f0eff87 --- /dev/null +++ b/swagger/examples/httpSuccess_head204.json @@ -0,0 +1,6 @@ +{ + "parameters": {}, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/swagger/examples/httpSuccess_head404.json b/swagger/examples/httpSuccess_head404.json new file mode 100644 index 00000000..5f0eff87 --- /dev/null +++ b/swagger/examples/httpSuccess_head404.json @@ -0,0 +1,6 @@ +{ + "parameters": {}, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/swagger/examples/queries_ArrayStringMultiEmpty.json b/swagger/examples/queries_ArrayStringMultiEmpty.json new file mode 100644 index 00000000..afb314d3 --- /dev/null +++ b/swagger/examples/queries_ArrayStringMultiEmpty.json @@ -0,0 +1,8 @@ +{ + "parameters": { + "arrayQuery": "" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/swagger/examples/queries_ArrayStringMultiNull.json b/swagger/examples/queries_ArrayStringMultiNull.json new file mode 100644 index 00000000..28118df1 --- /dev/null +++ b/swagger/examples/queries_ArrayStringMultiNull.json @@ -0,0 +1,7 @@ +{ + "parameters": { + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/swagger/examples/queries_ArrayStringMultiValid.json b/swagger/examples/queries_ArrayStringMultiValid.json new file mode 100644 index 00000000..30124dfa --- /dev/null +++ b/swagger/examples/queries_ArrayStringMultiValid.json @@ -0,0 +1,8 @@ +{ + "parameters": { + "arrayQuery": "ArrayQuery1,begin!*'();:@ &=+$,/?#[]end,," + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/swagger/head.json b/swagger/head.json index 1b76730e..8116f12a 100644 --- a/swagger/head.json +++ b/swagger/head.json @@ -16,6 +16,11 @@ "head": { "operationId": "httpSuccess_head200", "description": "Return 200 status code if successful", + "x-ms-examples": { + "httpSuccess_head200": { + "$ref": "./examples/httpSuccess_head200.json" + } + }, "tags": [ "HttpSuccess Operations" ], @@ -36,6 +41,11 @@ "head": { "operationId": "httpSuccess_head204", "description": "Return 204 status code if successful", + "x-ms-examples": { + "httpSuccess_head204": { + "$ref": "./examples/httpSuccess_head204.json" + } + }, "tags": [ "HttpSuccess Operations" ], @@ -56,6 +66,11 @@ "head": { "operationId": "httpSuccess_head404", "description": "Return 404 status code if successful", + "x-ms-examples": { + "httpSuccess_head404": { + "$ref": "./examples/httpSuccess_head404.json" + } + }, "tags": [ "HttpSuccess Operations" ], diff --git a/swagger/non-string-enum.json b/swagger/non-string-enum.json index 5eb263f2..e3a6a494 100644 --- a/swagger/non-string-enum.json +++ b/swagger/non-string-enum.json @@ -16,6 +16,11 @@ "put": { "description": "Put an int enum", "operationId": "Int_put", + "x-ms-examples": { + "Int_put": { + "$ref": "./examples/Int_put.json" + } + }, "parameters": [ { "name": "input", @@ -41,6 +46,11 @@ "get": { "description": "Get an int enum", "operationId": "Int_get", + "x-ms-examples": { + "Int_get": { + "$ref": "./examples/Int_get.json" + } + }, "responses": { "200": { "description": "Returns int enum", @@ -55,6 +65,11 @@ "put": { "description": "Put a float enum", "operationId": "Float_put", + "x-ms-examples": { + "Float_put": { + "$ref": "./examples/Float_put.json" + } + }, "parameters": [ { "name": "input", @@ -80,6 +95,11 @@ "get": { "description": "Get a float enum", "operationId": "Float_Get", + "x-ms-examples": { + "Float_Get": { + "$ref": "./examples/Float_Get.json" + } + }, "responses": { "200": { "description": "Returns float enum", diff --git a/swagger/url-multi-collectionFormat.json b/swagger/url-multi-collectionFormat.json index 05722ed6..99d40493 100644 --- a/swagger/url-multi-collectionFormat.json +++ b/swagger/url-multi-collectionFormat.json @@ -16,6 +16,11 @@ "get": { "operationId": "queries_ArrayStringMultiNull", "description": "Get a null array of string using the multi-array format", + "x-ms-examples": { + "queries_ArrayStringMultiNull": { + "$ref": "./examples/queries_ArrayStringMultiNull.json" + } + }, "tags": [ "query Operations" ], @@ -48,6 +53,11 @@ "get": { "operationId": "queries_ArrayStringMultiEmpty", "description": "Get an empty array [] of string using the multi-array format", + "x-ms-examples": { + "queries_ArrayStringMultiEmpty": { + "$ref": "./examples/queries_ArrayStringMultiEmpty.json" + } + }, "tags": [ "query Operations" ], @@ -80,6 +90,11 @@ "get": { "operationId": "queries_ArrayStringMultiValid", "description": "Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the mult-array format", + "x-ms-examples": { + "queries_ArrayStringMultiValid": { + "$ref": "./examples/queries_ArrayStringMultiValid.json" + } + }, "tags": [ "query Operations" ],