12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- {
- "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"
- }
- }
- }
- }
- }
|