Created
March 21, 2020 13:09
-
-
Save hieunhums/e38c910458a6b25a6bdeeb39b52faa94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.0.1", | |
| "info": { | |
| "title": "Todo API", | |
| "version": "v1" | |
| }, | |
| "paths": { | |
| "/api/TodoItems": { | |
| "get": { | |
| "tags": [ | |
| "TodoItems" | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Success", | |
| "content": { | |
| "text/plain": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| }, | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| }, | |
| "text/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "post": { | |
| "tags": [ | |
| "TodoItems" | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "text/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "application/*+json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Success", | |
| "content": { | |
| "text/plain": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "text/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/api/TodoItems/{id}": { | |
| "get": { | |
| "tags": [ | |
| "TodoItems" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "integer", | |
| "format": "int64" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Success", | |
| "content": { | |
| "text/plain": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "text/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "put": { | |
| "tags": [ | |
| "TodoItems" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "integer", | |
| "format": "int64" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "text/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "application/*+json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Success" | |
| } | |
| } | |
| }, | |
| "delete": { | |
| "tags": [ | |
| "TodoItems" | |
| ], | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "integer", | |
| "format": "int64" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Success", | |
| "content": { | |
| "text/plain": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| }, | |
| "text/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/TodoItem" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/WeatherForecast": { | |
| "get": { | |
| "tags": [ | |
| "WeatherForecast" | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Success", | |
| "content": { | |
| "text/plain": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/WeatherForecast" | |
| } | |
| } | |
| }, | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/WeatherForecast" | |
| } | |
| } | |
| }, | |
| "text/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/WeatherForecast" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "components": { | |
| "schemas": { | |
| "TodoItem": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "format": "int64" | |
| }, | |
| "name": { | |
| "type": "string", | |
| "nullable": true | |
| }, | |
| "isComplete": { | |
| "type": "boolean" | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| "WeatherForecast": { | |
| "type": "object", | |
| "properties": { | |
| "date": { | |
| "type": "string", | |
| "format": "date-time" | |
| }, | |
| "temperatureC": { | |
| "type": "integer", | |
| "format": "int32" | |
| }, | |
| "temperatureF": { | |
| "type": "integer", | |
| "format": "int32", | |
| "readOnly": true | |
| }, | |
| "summary": { | |
| "type": "string", | |
| "nullable": true | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment