rapipdf
Version:
RapiPdf - Generate PDF from Open API spec
75 lines (74 loc) • 1.68 kB
JSON
{
"swagger": "2.0",
"info": {
"title": "Basic Spec",
"description": ""
},
"consumes": [ "application/json"],
"produces": [ "application/json"],
"paths": {
"/api/employee": {
"get": {
"tags": ["Employee Details"],
"summary": "List of employees",
"operationId": "empDetails",
"parameters": [
{
"description": "Set a limit to number of items returned",
"in": "query",
"name": "limit",
"required": false,
"type": "integer",
"default": 100,
"example": 50,
"minimum": 1,
"maximum": 100
}
],
"responses": {
"200": {
"description": "Employee Schema",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/employee"
}
}
}
}
}
}
},
"definitions": {
"employee": {
"description": "Employee Details",
"type": "object",
"additionalProperties": false,
"properties": {
"name": { "type": "string"},
"age": { "type": "integer"},
"departments" : {
"type": "array",
"items": {
"type": "string"
}
},
"tags" : {
"type": "array",
"items": {
"$ref": "#/definitions/department"
}
}
}
},
"department": {
"description": "Employee Details",
"type": "object",
"additionalProperties": false,
"properties": {
"deptId": { "type": "integer"},
"name": { "type": "string"}
}
}
}
}