This commit is contained in:
wadewegner 2015-12-07 20:35:42 -08:00
Родитель 817bb3131b
Коммит b568f1440b
2 изменённых файлов: 11 добавлений и 38 удалений

Просмотреть файл

@ -1,10 +0,0 @@
{
"$schema": "http://json-schema.org/schemas/2014-11-01/apiapp.json#",
"id": "GoTodoApiAppDemo",
"namespace": "microsoft.com",
"gateway": "2015-01-14",
"version": "1.0.0",
"title": "Go Todo Api App Demo",
"summary": "Build demo for showing a Go Api App",
"author": "Wade Wegner"
}

Просмотреть файл

@ -1,15 +1,13 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"title": "Go Todo Api App Demo", "title": "Go Todo PowerApps Demo",
"description": "Build demo for showing a Go Api App",
"version": "1.0.0" "version": "1.0.0"
}, },
"host": "go-powerapp.herokuapp.com", "host": "go-powerapp.herokuapp.com",
"schemes": [ "schemes": [
"https" "http"
], ],
"basePath": "/v1",
"produces": [ "produces": [
"application/json" "application/json"
], ],
@ -21,6 +19,10 @@
"tags": [ "tags": [
"Todos" "Todos"
], ],
"operationId": "ToDo",
"produces": [
"application/json"
],
"responses": { "responses": {
"200": { "200": {
"description": "An array of todos", "description": "An array of todos",
@ -30,12 +32,6 @@
"$ref": "#/definitions/Todo" "$ref": "#/definitions/Todo"
} }
} }
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
} }
} }
} }
@ -43,38 +39,25 @@
}, },
"definitions": { "definitions": {
"Todo": { "Todo": {
"type": "object",
"properties": { "properties": {
"Id": { "id": {
"type": "number", "type": "number",
"description": "Unique id for todo" "description": "Unique id for todo"
}, },
"Name": { "name": {
"type": "string", "type": "string",
"description": "Name of the todo item" "description": "Name of the todo item"
}, },
"Completed": { "completed": {
"type": "boolean", "type": "boolean",
"description": "Is the todo item complete?." "description": "Is the todo item complete?."
}, },
"Due": { "due": {
"type": "string", "type": "string",
"description": "Time the todo item is due." "description": "Time the todo item is due."
} }
} }
},
"Error": {
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"fields": {
"type": "string"
}
}
} }
} }
} }