Seastar
High performance C++ framework for concurrent servers
|
An api doc that support swagger version 2.0.
The result is a unified JSON file with the swagger definitions.
The file content is a concatenation of the doc_entry by the order of their entry.
Definitions will be added under the definition section
typical usage:
First entry:
{ "swagger": "2.0", "host": "localhost:10000", "basePath": "/v2", "paths": {
entry: "/config/{id}": { "get": { "description": "Return a config value", "operationId": "findConfigId", "produces": [ "application/json" ], } }
Closing the entries: },
"definitions": { .....
..... } }
#include <seastar/http/api_docs.hh>
Public Member Functions | |
future | write (output_stream< char > &&, std::unique_ptr< http::request > req) |
void | add_api (doc_entry &&f) |
void | add_definition (doc_entry &&f) |