Created
December 3, 2018 16:41
-
-
Save belgoros/c125b069cce8a59b884698668a1c1f2f to your computer and use it in GitHub Desktop.
This file contains 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
// 20181203173529 | |
// http://localhost:3000/apidocs | |
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "1.0.0", | |
"title": "Example Project API", | |
"description": "A Swagger Project API that uses a bla-bla-bla project features in commliance with the swagger-2.0 specification", | |
"contact": { | |
"name": "Fancy API Team" | |
}, | |
"license": { | |
"name": "MIT" | |
} | |
}, | |
"tags": Array[1][ | |
{ | |
"name": "decastore", | |
"description": "Example Project API operations", | |
"externalDocs": { | |
"description": "Find more info here", | |
"url": "https://swagger.io" | |
} | |
} | |
], | |
"host": "https://api-eu.swagger/example-project", | |
"basePath": "/v1", | |
"consumes": Array[1][ | |
"application/json" | |
], | |
"produces": Array[1][ | |
"application/json" | |
], | |
"paths": { | |
"/languages": { | |
"get": { | |
"summary": "All Language tags", | |
"description": "Returns all language ISO tags from the system that the user has access to", | |
"produces": Array[1][ | |
"application/json" | |
], | |
"tags": Array[1][ | |
"language" | |
], | |
"responses": { | |
"200": { | |
"description": "Languages response", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Language" | |
} | |
} | |
}, | |
"default": { | |
"description": "unexpected error", | |
"schema": { | |
"$ref": "#/definitions/ErrorModel" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Language": { | |
"required": Array[2][ | |
"id", | |
"tag" | |
], | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int64" | |
}, | |
"tag": { | |
"type": "string" | |
} | |
} | |
}, | |
"LanguageInput": { | |
"allOf": Array[2][ | |
{ | |
"$ref": "#/definitions/Language" | |
}, | |
{ | |
"required": Array[1][ | |
"tag" | |
], | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int64" | |
} | |
} | |
} | |
] | |
}, | |
"ErrorModel": { | |
"required": Array[2][ | |
"code", | |
"message" | |
], | |
"properties": { | |
"code": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"message": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment