1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- {
- "swagger": "2.0",
- "info": {
- "contact": {}
- },
- "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"
- }
- }
- }
- }
- }
|