Slide 37
Slide 37 text
Swagger
• Originally by Wordnik,
maintained by Reverb
• Specification and interface
for RESTful APIs
• "Define" API (to Swagger
spec), then generate
documentation, code,
and a testing sandbox
• Think "IDL" for REST
• Numerous libraries
• Python, Ruby,
PHP, .NET, and more
37
{
"swaggerVersion": "1.2",
"basePath": "http://localhost:8000/greetings",
"apis": [
{
"path": "/hello/{subject}",
"operations": [
{
"method": "GET",
"summary": "Greet our subject with hello!",
"type": "string",
"nickname": "helloSubject",
"parameters": [
{
"name": "subject",
"description": "The subject to be greeted.",
"required": true,
"type": "string",
"paramType": "path"
}
]
}
]
}
]
}
Example Swagger definition