Model.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-swagger
#include "oatpp-swagger/oas3/Model.hpp"

This file contains Open Api 3.0.0 Specification Model.

Contact

Contact.

namespace oatpp { namespace swagger { namespace oas3 { 
  class Contact : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String name Name.
String url Url.
String email Email.

Methods

Return Type Name Summary
ObjectWrapper createFromBaseModel Create Contact from oatpp::swagger::Contact.

Contact::name

Name.

DTO_FIELD(String, name)

Contact::url

Url.

DTO_FIELD(String, url)

Contact::email

Email.

DTO_FIELD(String, email)

Contact::createFromBaseModel

Create Contact from oatpp::swagger::Contact.

static ObjectWrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::Contact>& model)

License

License.

namespace oatpp { namespace swagger { namespace oas3 { 
  class License : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String name Name.
String url Url.

Methods

Return Type Name Summary
ObjectWrapper createFromBaseModel Create Liscense from oatpp::swagger::License.

License::name

Name.

DTO_FIELD(String, name)

License::url

Url.

DTO_FIELD(String, url)

License::createFromBaseModel

Create Liscense from oatpp::swagger::License.

static ObjectWrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::License>& model)

Info

Info.

namespace oatpp { namespace swagger { namespace oas3 { 
  class Info : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String title Title.
String description Description.
String termsOfService Terms of service.
Contact::ObjectWrapper contact oatpp::swagger::oas3::Contact.
License::ObjectWrapper license oatpp::swagger::oas3::License.
String version Version.

Methods

Return Type Name Summary
ObjectWrapper createFromBaseModel Create Info from oatpp::swagger::DocumentHeader.

Info::title

Title.

DTO_FIELD(String, title)

Info::description

Description.

DTO_FIELD(String, description)

Info::termsOfService

Terms of service.

DTO_FIELD(String, termsOfService)

Info::contact

oatpp::swagger::oas3::Contact.

DTO_FIELD(Contact::ObjectWrapper, contact)

Info::license

oatpp::swagger::oas3::License.

DTO_FIELD(License::ObjectWrapper, license)

Info::version

Version.

DTO_FIELD(String, version)

Info::createFromBaseModel

Create Info from oatpp::swagger::DocumentHeader.

static ObjectWrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::DocumentHeader>& model)

ServerVariable

Server Variable.

namespace oatpp { namespace swagger { namespace oas3 { 
  class ServerVariable : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String description Description.
List<String>::ObjectWrapper enumValues Enum values.
String defaultValue Default value.

Methods

Return Type Name Summary
ObjectWrapper createFromBaseModel Create ServerVariable from oatpp::swagger::ServerVariable.

ServerVariable::description

Description.

DTO_FIELD(String, description)

ServerVariable::enumValues

Enum values.

DTO_FIELD(List<String>::ObjectWrapper, enumValues, "enum")

ServerVariable::defaultValue

Default value.

DTO_FIELD(String, defaultValue, "default")

ServerVariable::createFromBaseModel

Create ServerVariable from oatpp::swagger::ServerVariable.

static ObjectWrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::ServerVariable>& model)

Server

Server.

namespace oatpp { namespace swagger { namespace oas3 { 
  class Server : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String url Url.
String description Description.
Fields<ServerVariable::ObjectWrapper>::ObjectWrapper variables Variables.

Methods

Return Type Name Summary
ObjectWrapper createFromBaseModel Create Server from oatpp::swagger::Server.

Server::url

Url.

DTO_FIELD(String, url)

Server::description

Description.

DTO_FIELD(String, description)

Server::variables

Variables.

DTO_FIELD(Fields<ServerVariable::ObjectWrapper>::ObjectWrapper, variables)

Server::createFromBaseModel

Create Server from oatpp::swagger::Server.

static ObjectWrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::Server>& model)

Schema

Schema.

namespace oatpp { namespace swagger { namespace oas3 { 
  class Schema : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String type Type. Ex.: integer, string, etc.
String format Format. Ex.: int32, int64, etc.
Fields<Schema::ObjectWrapper>::ObjectWrapper properties Map of oatpp::String to Schema.
Schema::ObjectWrapper items Items.
String ref Ref.

Schema::type

Type. Ex.: integer, string, etc.

DTO_FIELD(String, type)

Schema::format

Format. Ex.: int32, int64, etc.

DTO_FIELD(String, format)

Schema::properties

Map of oatpp::String to Schema.

DTO_FIELD(Fields<Schema::ObjectWrapper>::ObjectWrapper, properties)

Schema::items

Items.

DTO_FIELD(Schema::ObjectWrapper, items)

Schema::ref

Ref.

DTO_FIELD(String, ref, "$ref")

MediaTypeObject

Media type object.

namespace oatpp { namespace swagger { namespace oas3 { 
  class MediaTypeObject : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
Schema::ObjectWrapper schema Schema.

MediaTypeObject::schema

Schema.

DTO_FIELD(Schema::ObjectWrapper, schema)

OAuthFlow

OAuth flow Object https://swagger.io/specification/#oauthFlowObject

namespace oatpp { namespace swagger { namespace oas3 { 
  class OAuthFlow : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String authorizationUrl Authorization url.
String tokenUrl Token url.
String refreshUrl Refresh url.
Fields<String>::ObjectWrapper scopes Scopes.

OAuthFlow::authorizationUrl

Authorization url.

DTO_FIELD(String, authorizationUrl)

OAuthFlow::tokenUrl

Token url.

DTO_FIELD(String, tokenUrl)

OAuthFlow::refreshUrl

Refresh url.

DTO_FIELD(String, refreshUrl)

OAuthFlow::scopes

Scopes.

DTO_FIELD(Fields<String>::ObjectWrapper, scopes)

OAuthFlows

OAuth Flows Object https://swagger.io/specification/#oauthFlowObject

namespace oatpp { namespace swagger { namespace oas3 { 
  class OAuthFlows : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
OAuthFlow::ObjectWrapper implicit Implicit.
OAuthFlow::ObjectWrapper password Password.
OAuthFlow::ObjectWrapper clientCredentials Client credentials.
OAuthFlow::ObjectWrapper authorizationCode Authorization code.

OAuthFlows::implicit

Implicit.

DTO_FIELD(OAuthFlow::ObjectWrapper, implicit)

OAuthFlows::password

Password.

DTO_FIELD(OAuthFlow::ObjectWrapper, password)

OAuthFlows::clientCredentials

Client credentials.

DTO_FIELD(OAuthFlow::ObjectWrapper, clientCredentials)

OAuthFlows::authorizationCode

Authorization code.

DTO_FIELD(OAuthFlow::ObjectWrapper, authorizationCode)

SecurityScheme

Security Scheme object.

namespace oatpp { namespace swagger { namespace oas3 { 
  class SecurityScheme : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String type Type.
String description Description.
String name Name.
String in 'In'.
String scheme Scheme.
String bearerFormat Bearer format.
OAuthFlows::ObjectWrapper flows Flows.
String openIdConnectUrl Open id connect url.

SecurityScheme::type

Type.

DTO_FIELD(String, type)

SecurityScheme::description

Description.

DTO_FIELD(String, description)

SecurityScheme::name

Name.

DTO_FIELD(String, name)

SecurityScheme::in

'In'.

DTO_FIELD(String, in)

SecurityScheme::scheme

Scheme.

DTO_FIELD(String, scheme)

SecurityScheme::bearerFormat

Bearer format.

DTO_FIELD(String, bearerFormat)

SecurityScheme::flows

Flows.

DTO_FIELD(OAuthFlows::ObjectWrapper, flows)

SecurityScheme::openIdConnectUrl

Open id connect url.

DTO_FIELD(String, openIdConnectUrl)

OperationResponse

Operation Response.

namespace oatpp { namespace swagger { namespace oas3 { 
  class OperationResponse : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String description Description.
Fields<MediaTypeObject::ObjectWrapper>::ObjectWrapper content MediaTypeObject.

OperationResponse::description

Description.

DTO_FIELD(String, description)

OperationResponse::content

MediaTypeObject.

DTO_FIELD(Fields<MediaTypeObject::ObjectWrapper>::ObjectWrapper, content)

RequestBody

Request body.

namespace oatpp { namespace swagger { namespace oas3 { 
  class RequestBody : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String description Description.
Fields<MediaTypeObject::ObjectWrapper>::ObjectWrapper content MediaTypeObject.

RequestBody::description

Description.

DTO_FIELD(String, description)

RequestBody::content

MediaTypeObject.

DTO_FIELD(Fields<MediaTypeObject::ObjectWrapper>::ObjectWrapper, content)

PathItemParameter

Path item parameter.

namespace oatpp { namespace swagger { namespace oas3 { 
  class PathItemParameter : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String name Parameter name.
String description Parameter description.
String in Parameter place - "query", "header", "path"
Boolean required Is Parameter required.
Boolean deprecated Is Parameter deprecated.
Schema::ObjectWrapper schema Parameter schema. Schema.

PathItemParameter::name

Parameter name.

DTO_FIELD(String, name)

PathItemParameter::description

Parameter description.

DTO_FIELD(String, description)

PathItemParameter::in

Parameter place - "query", "header", "path"

DTO_FIELD(String, in)

PathItemParameter::required

Is Parameter required.

DTO_FIELD(Boolean, required)

PathItemParameter::deprecated

Is Parameter deprecated.

DTO_FIELD(Boolean, deprecated)

PathItemParameter::schema

Parameter schema. Schema.

DTO_FIELD(Schema::ObjectWrapper, schema)

PathItemOperation

Path item operation.

namespace oatpp { namespace swagger { namespace oas3 { 
  class PathItemOperation : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String description Description.
String summary Summary.
String operationId Operation ID.
RequestBody::ObjectWrapper requestBody Request Body.
List<String>::ObjectWrapper tags List of tags.
Fields<OperationResponse::ObjectWrapper>::ObjectWrapper responses Map of oatpp::String to OperationResponse.
List<PathItemParameter::ObjectWrapper>::ObjectWrapper parameters List of PathItemParameter.
List<Fields<List<String>::ObjectWrapper>::ObjectWrapper>::ObjectWrapper security Security requirements.

PathItemOperation::description

Description.

DTO_FIELD(String, description)

PathItemOperation::summary

Summary.

DTO_FIELD(String, summary)

PathItemOperation::operationId

Operation ID.

DTO_FIELD(String, operationId)

PathItemOperation::requestBody

Request Body.

DTO_FIELD(RequestBody::ObjectWrapper, requestBody)

PathItemOperation::tags

List of tags.

DTO_FIELD(List<String>::ObjectWrapper, tags)

PathItemOperation::responses

Map of oatpp::String to OperationResponse.

DTO_FIELD(Fields<OperationResponse::ObjectWrapper>::ObjectWrapper, responses)

PathItemOperation::parameters

List of PathItemParameter.

DTO_FIELD(List<PathItemParameter::ObjectWrapper>::ObjectWrapper, parameters)

PathItemOperation::security

Security requirements.

DTO_FIELD(List<Fields<List<String>::ObjectWrapper>::ObjectWrapper>::ObjectWrapper, security)

PathItem

Path item.

namespace oatpp { namespace swagger { namespace oas3 { 
  class PathItem : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
PathItemOperation::ObjectWrapper operationGet Operation GET.
PathItemOperation::ObjectWrapper operationPut Operation PUT.
PathItemOperation::ObjectWrapper operationPost Operation POST.
PathItemOperation::ObjectWrapper operationDelete Operation DELETE.
PathItemOperation::ObjectWrapper operationOptions Operation OPTIONS.
PathItemOperation::ObjectWrapper operationHead Operation HEAD.
PathItemOperation::ObjectWrapper operationPatch Operation PATCH.
PathItemOperation::ObjectWrapper operationTrace Operation TRACE.

PathItem::operationGet

Operation GET.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationGet, "get")

PathItem::operationPut

Operation PUT.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationPut, "put")

PathItem::operationPost

Operation POST.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationPost, "post")

PathItem::operationDelete

Operation DELETE.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationDelete, "delete")

PathItem::operationOptions

Operation OPTIONS.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationOptions, "options")

PathItem::operationHead

Operation HEAD.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationHead, "head")

PathItem::operationPatch

Operation PATCH.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationPatch, "patch")

PathItem::operationTrace

Operation TRACE.

DTO_FIELD(PathItemOperation::ObjectWrapper, operationTrace, "trace")

Components

Component.

namespace oatpp { namespace swagger { namespace oas3 { 
  class Components : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
Fields<Schema::ObjectWrapper>::ObjectWrapper schemas Map of oatpp::String to Schema.
Fields<SecurityScheme::ObjectWrapper>::ObjectWrapper securitySchemes Map of oatpp::String to SecurityScheme.

Components::schemas

Map of oatpp::String to Schema.

DTO_FIELD(Fields<Schema::ObjectWrapper>::ObjectWrapper, schemas)

Components::securitySchemes

Map of oatpp::String to SecurityScheme.

DTO_FIELD(Fields<SecurityScheme::ObjectWrapper>::ObjectWrapper, securitySchemes)

Document

Document.

namespace oatpp { namespace swagger { namespace oas3 { 
  class Document : public oatpp::data::mapping::type::Object {}
}}}

Fields

Type Name Summary
String openapi Open Api Version.
Info::ObjectWrapper info Info.
List<Server::ObjectWrapper>::ObjectWrapper servers List of Server.
Fields<PathItem::ObjectWrapper>::ObjectWrapper paths Map of oatpp::String to PathItem.
Components::ObjectWrapper components Components.

Document::openapi

Open Api Version.

DTO_FIELD(String, openapi, "openapi") = "3.0.0"

Document::info

Info.

DTO_FIELD(Info::ObjectWrapper, info)

Document::servers

List of Server.

DTO_FIELD(List<Server::ObjectWrapper>::ObjectWrapper, servers)

Document::paths

Map of oatpp::String to PathItem.

DTO_FIELD(Fields<PathItem::ObjectWrapper>::ObjectWrapper, paths)

Document::components

Components.

DTO_FIELD(Components::ObjectWrapper, components)