@microsoft.azure/autorest.testserver
Version:
Autorest test server.
619 lines (618 loc) • 18.7 kB
JSON
{
"swagger": "2.0",
"info": {
"title": "AutoRest Swagger BAT Service",
"description": "Test Infrastructure for AutoRest Swagger BAT",
"version": "1.0.0"
},
"host": "localhost:3000",
"schemes": ["http"],
"produces": ["application/json"],
"consumes": ["application/json"],
"paths": {
"/string/null": {
"get": {
"operationId": "string_getNull",
"description": "Get null string value value",
"x-ms-examples": {
"string_getNull": {
"$ref": "./examples/string_getNull.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The null String value",
"schema": {
"type": "string",
"x-nullable": true
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "string_putNull",
"description": "Set string value null",
"x-ms-examples": {
"string_putNull": {
"$ref": "./examples/string_putNull.json"
}
},
"parameters": [
{
"name": "stringBody",
"description": "string body",
"in": "body",
"schema": {
"type": "string",
"x-nullable": true
}
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/empty": {
"get": {
"operationId": "string_getEmpty",
"description": "Get empty string value value ''",
"x-ms-examples": {
"string_getEmpty": {
"$ref": "./examples/string_getEmpty.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The empty String value",
"schema": {
"type": "string",
"enum": [""],
"x-ms-enum": { "modelAsString": false }
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "string_putEmpty",
"description": "Set string value empty ''",
"x-ms-examples": {
"string_putEmpty": {
"$ref": "./examples/string_putEmpty.json"
}
},
"parameters": [
{
"name": "stringBody",
"description": "string body",
"in": "body",
"schema": {
"type": "string",
"enum": [""],
"x-ms-enum": { "modelAsString": false }
},
"required": true
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/mbcs": {
"get": {
"operationId": "string_getMbcs",
"description": "Get mbcs string value '啊齄丂狛狜隣郎隣兀﨩ˊ〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€'",
"x-ms-examples": {
"string_getMbcs": {
"$ref": "./examples/string_getMbcs.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The mbcs String value",
"schema": {
"type": "string",
"enum": [
"啊齄丂狛狜隣郎隣兀﨩ˊ〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€"
],
"x-ms-enum": { "modelAsString": false }
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "string_putMbcs",
"description": "Set string value mbcs '啊齄丂狛狜隣郎隣兀﨩ˊ〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€'",
"x-ms-examples": {
"string_putMbcs": {
"$ref": "./examples/string_putMbcs.json"
}
},
"parameters": [
{
"name": "stringBody",
"description": "string body",
"in": "body",
"schema": {
"type": "string",
"enum": [
"啊齄丂狛狜隣郎隣兀﨩ˊ〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€"
],
"x-ms-enum": { "modelAsString": false }
},
"required": true
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/whitespace": {
"get": {
"operationId": "string_getWhitespace",
"description": "Get string value with leading and trailing whitespace '<tab><space><space>Now is the time for all good men to come to the aid of their country<tab><space><space>'",
"x-ms-examples": {
"string_getWhitespace": {
"$ref": "./examples/string_getWhitespace.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The String value with leading and trailing whitespace '<tab><space><space>Now is the time for all good men to come to the aid of their country<tab><space><space>'",
"schema": {
"type": "string",
"enum": [" Now is the time for all good men to come to the aid of their country "],
"x-ms-enum": { "modelAsString": false }
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "string_putWhitespace",
"description": "Set String value with leading and trailing whitespace '<tab><space><space>Now is the time for all good men to come to the aid of their country<tab><space><space>'",
"x-ms-examples": {
"string_putWhitespace": {
"$ref": "./examples/string_putWhitespace.json"
}
},
"parameters": [
{
"name": "stringBody",
"description": "string body",
"in": "body",
"schema": {
"type": "string",
"enum": [" Now is the time for all good men to come to the aid of their country "],
"x-ms-enum": { "modelAsString": false }
},
"required": true
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/enum/notExpandable": {
"get": {
"operationId": "enum_getNotExpandable",
"description": "Get enum value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'.",
"x-ms-examples": {
"enum_getNotExpandable": {
"$ref": "./examples/enum_getNotExpandable.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The String value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'",
"schema": {
"x-ms-enum": { "name": "Colors", "modelAsString": false },
"type": "string",
"enum": ["red color", "green-color", "blue_color"]
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "enum_putNotExpandable",
"description": "Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'",
"x-ms-examples": {
"enum_putNotExpandable": {
"$ref": "./examples/enum_putNotExpandable.json"
}
},
"parameters": [
{
"name": "stringBody",
"description": "string body",
"in": "body",
"schema": {
"x-ms-enum": { "name": "Colors", "modelAsString": false },
"type": "string",
"enum": ["red color", "green-color", "blue_color"]
},
"required": true
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/enum/Referenced": {
"get": {
"operationId": "enum_getReferenced",
"description": "Get enum value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'.",
"x-ms-examples": {
"enum_getReferenced": {
"$ref": "./examples/enum_getReferenced.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The String value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'",
"schema": {
"$ref": "#/definitions/RefColors"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "enum_putReferenced",
"description": "Sends value 'red color' from enumeration of 'red color', 'green-color', 'blue_color'",
"x-ms-examples": {
"enum_putReferenced": {
"$ref": "./examples/enum_putReferenced.json"
}
},
"parameters": [
{
"name": "enumStringBody",
"description": "enum string body",
"in": "body",
"schema": {
"$ref": "#/definitions/RefColors"
},
"required": true
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/enum/ReferencedConstant": {
"get": {
"operationId": "enum_getReferencedConstant",
"description": "Get value 'green-color' from the constant.",
"x-ms-examples": {
"enum_getReferencedConstant": {
"$ref": "./examples/enum_getReferencedConstant.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The String value 'green-color' from a constant",
"schema": {
"$ref": "#/definitions/RefColorConstant"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "enum_putReferencedConstant",
"description": "Sends value 'green-color' from a constant",
"x-ms-examples": {
"enum_putReferencedConstant": {
"$ref": "./examples/enum_putReferencedConstant.json"
}
},
"parameters": [
{
"name": "enumStringBody",
"description": "enum string body",
"in": "body",
"schema": {
"$ref": "#/definitions/RefColorConstant"
},
"required": true
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/notProvided": {
"get": {
"operationId": "string_getNotProvided",
"description": "Get String value when no string value is sent in response payload",
"x-ms-examples": {
"string_getNotProvided": {
"$ref": "./examples/string_getNotProvided.json"
}
},
"tags": ["String Operations"],
"responses": {
"200": {
"description": "The not provided string value",
"schema": {
"type": "string"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/base64Encoding": {
"get": {
"operationId": "string_getBase64Encoded",
"description": "Get value that is base64 encoded",
"tags": ["String Operations"],
"x-ms-examples": {
"string_getBase64Encoded": {
"$ref": "./examples/string_getBase64Encoded.json"
}
},
"responses": {
"200": {
"description": "The base64 encoded string value",
"schema": {
"type": "string",
"format": "byte"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/base64UrlEncoding": {
"get": {
"operationId": "string_getBase64UrlEncoded",
"description": "Get value that is base64url encoded",
"tags": ["String Operations"],
"x-ms-examples": {
"string_getBase64UrlEncoded": {
"$ref": "./examples/string_getBase64UrlEncoded.json"
}
},
"responses": {
"200": {
"description": "The base64url encoded string value",
"schema": {
"type": "string",
"format": "base64url"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "string_putBase64UrlEncoded",
"description": "Put value that is base64url encoded",
"x-ms-examples": {
"string_putBase64UrlEncoded": {
"$ref": "./examples/string_putBase64UrlEncoded.json"
}
},
"parameters": [
{
"name": "stringBody",
"description": "string body",
"in": "body",
"schema": {
"type": "string",
"format": "base64url"
},
"required": true
}
],
"tags": ["String Operations"],
"responses": {
"200": {
"description": "Empty Response"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/string/nullBase64UrlEncoding": {
"get": {
"operationId": "string_getNullBase64UrlEncoded",
"description": "Get null value that is expected to be base64url encoded",
"tags": ["String Operations"],
"x-ms-examples": {
"string_getNullBase64UrlEncoded": {
"$ref": "./examples/string_getNullBase64UrlEncoded.json"
}
},
"responses": {
"200": {
"description": "The null value",
"schema": {
"type": "string",
"format": "base64url",
"x-nullable": true
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Error": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
},
"RefColors": {
"x-ms-enum": { "name": "Colors", "modelAsString": false },
"type": "string",
"enum": ["red color", "green-color", "blue_color"],
"description": "Referenced Color Enum Description."
},
"RefColorConstant": {
"type": "object",
"properties": {
"ColorConstant": {
"x-ms-enum": { "name": "ColorConstant", "modelAsString": false },
"type": "string",
"enum": ["green-color"],
"description": "Referenced Color Constant Description."
},
"field1": {
"type": "string",
"description": "Sample string."
}
},
"required": ["ColorConstant"]
}
}
}