{ "swagger": "2.0", "info": { "description": "FileCloud API documentation", "title": "FileCloud API", "contact": {}, "version": "1.0" }, "host": "localhost:8080", "basePath": "/api", "paths": { "/api/files": { "get": { "description": "Get a list of all files in the cloud storage", "produces": [ "application/json" ], "tags": [ "files" ], "summary": "List all files", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.File" } } } } }, "post": { "description": "Upload a file to the cloud storage", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "files" ], "summary": "Upload a file", "parameters": [ { "type": "file", "description": "File to upload", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/model.File" } } } } } }, "definitions": { "model.File": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "path": { "type": "string" }, "size": { "type": "integer" }, "type": { "type": "string" }, "updated_at": { "type": "string" } } } } }