Seastar
High performance C++ framework for concurrent servers
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Member Functions | List of all members
seastar::httpd::api_docs_20 Class Reference

Detailed Description

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)
 

The documentation for this class was generated from the following file: