sptk2 logo
SPTK Home Page
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
sptk::OpenApiGenerator Class Reference

#include <OpenApiGenerator.h>

Classes

struct  Options
 

Public Types

enum class  AuthMethod : uint8_t { NONE , BASIC , BEARER }
 

Public Member Functions

 OpenApiGenerator (const String &title, const String &description, const String &version, const Strings &servers, const Options &options)
 
void generate (std::ostream &output, const WSOperationMap &operations, const WSComplexTypeMap &complexTypes, const std::map< String, String > &documentation) const
 

Static Public Member Functions

static AuthMethod authMethod (const String &auth)
 
static String authMethodName (AuthMethod auth)
 

Detailed Description

Generator of OpenAPI service description

Member Enumeration Documentation

◆ AuthMethod

enum class sptk::OpenApiGenerator::AuthMethod : uint8_t
strong

Authentication method

Enumerator
NONE 

No authentication.

BASIC 

Authorization: Basic ZGVtbzpwQDU1dzByZA==.

BEARER 

Authorization: Bearer <token>

Constructor & Destructor Documentation

◆ OpenApiGenerator()

sptk::OpenApiGenerator::OpenApiGenerator ( const String title,
const String description,
const String version,
const Strings servers,
const Options options 
)

Constructor

Parameters
titleService title
descriptionService description
versionService version
serversServers that provide this service
optionsService options

Member Function Documentation

◆ generate()

void sptk::OpenApiGenerator::generate ( std::ostream &  output,
const WSOperationMap operations,
const WSComplexTypeMap complexTypes,
const std::map< String, String > &  documentation 
) const

Generate OpenAPI service description

Parameters
outputOutput stream
operationsService operations
complexTypesService types
documentationService documentation (by operation)

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

Fri Oct 14 2022 09:58:43: SPTK 5.4.1