UNPKG

@microsoft.azure/autorest.testserver

Version:

This project contains a set of OpenAPI definitions and a server implementing the corresponding API. Use this to test compliance of AutoRest generators.

118 lines (117 loc) 2.92 kB
{ "swagger": "2.0", "info": { "title": "AutoRest Swagger BAT Form Data Service", "description": "Test Infrastructure for AutoRest Swagger BAT", "version": "1.0.0" }, "host": "localhost:3000", "schemes": [ "http" ], "produces": [ "application/octet-stream" ], "consumes": [ "application/json" ], "paths": { "/formdata/stream/uploadfile": { "post": { "operationId": "formdata_UploadFile", "consumes": [ "multipart/form-data", "application/octet-stream" ], "produces": [ "application/octet-stream", "application/json" ], "description": "Upload file", "tags": [ "Formdata" ], "parameters": [ { "name": "fileContent", "description": "File to upload.", "required": true, "type": "file", "in": "formData" }, { "name": "fileName", "description": "File name to upload. Name has to be spelled exactly as written here.", "required": true, "in": "formData", "type": "string" } ], "responses": { "200": { "description": "Serialized file stream", "schema": { "type": "file" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "formdata_UploadFileViaBody", "consumes": [ "application/octet-stream" ], "produces": [ "application/octet-stream", "application/json" ], "description": "Upload file", "tags": [ "Formdata" ], "parameters": [ { "name": "fileContent", "description": "File to upload.", "required": true, "in": "body", "schema": { "type": "object", "format": "file" } } ], "responses": { "200": { "description": "Serialized file stream", "schema": { "type": "file" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "Error": { "type": "object", "properties": { "status": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } }