agent-enviroments/builder/libs/seastar/apps/httpd/demo.json
2024-09-10 17:06:08 +03:00

74 lines
2.4 KiB
JSON

{
"apiVersion": "0.0.1",
"swaggerVersion": "1.2",
"basePath": "{{Protocol}}://{{Host}}",
"resourcePath": "/hello",
"produces": [
"application/json"
],
"apis": [
{
"path": "/hello/world/{var1}/{var2}",
"operations": [
{
"method": "GET",
"summary": "Returns the number of seconds since the system was booted",
"type": "long",
"nickname": "hello_world",
"produces": [
"application/json"
],
"parameters": [
{
"name":"var2",
"description":"Full path of file or directory",
"required":true,
"allowMultiple":true,
"type":"string",
"paramType":"path"
},
{
"name":"var1",
"description":"Full path of file or directory",
"required":true,
"allowMultiple":false,
"type":"string",
"paramType":"path"
},
{
"name":"query_enum",
"description":"The operation to perform",
"required":true,
"allowMultiple":false,
"type":"string",
"paramType":"query",
"enum":["VAL1", "VAL2", "VAL3"]
}
]
}
]
}
],
"models" : {
"my_object": {
"id": "my_object",
"description": "Demonstrate an object",
"properties": {
"var1": {
"type": "string",
"description": "The first parameter in the path"
},
"var2": {
"type": "string",
"description": "The second parameter in the path"
},
"enum_var" : {
"type": "string",
"description": "Demonstrate an enum returned, note this is not the same enum type of the request",
"enum":["VAL1", "VAL2", "VAL3"]
}
}
}
}
}