# 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::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | name | Name. |
String | url | Url. |
String | Email. |
# Methods
Return Type | Name | Summary |
---|---|---|
Wrapper | 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.
- @param model - oatpp::swagger::Contact
- @return - Contact.
static Wrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::Contact>& model)
# License
License.
namespace oatpp { namespace swagger { namespace oas3 {
class License : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | name | Name. |
String | url | Url. |
# Methods
Return Type | Name | Summary |
---|---|---|
Wrapper | 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.
- @param model - oatpp::swagger::License.
- @return - License.
static Wrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::License>& model)
# Info
Info.
namespace oatpp { namespace swagger { namespace oas3 {
class Info : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | title | Title. |
String | description | Description. |
String | termsOfService | Terms of service. |
Object<Contact> | contact | oatpp::swagger::oas3::Contact. |
Object<License> | license | oatpp::swagger::oas3::License. |
String | version | Version. |
# Methods
Return Type | Name | Summary |
---|---|---|
Wrapper | 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(Object<Contact>, contact)
# Info::license
oatpp::swagger::oas3::License.
DTO_FIELD(Object<License>, license)
# Info::version
Version.
DTO_FIELD(String, version)
# Info::createFromBaseModel
Create Info from oatpp::swagger::DocumentHeader.
- @param model - oatpp::swagger::DocumentHeader.
- @return - Info.
static Wrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::DocumentHeader>& model)
# ServerVariable
Server Variable.
namespace oatpp { namespace swagger { namespace oas3 {
class ServerVariable : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | description | Description. |
List<String> | enumValues | Enum values. |
String | defaultValue | Default value. |
# Methods
Return Type | Name | Summary |
---|---|---|
Wrapper | createFromBaseModel | Create ServerVariable from oatpp::swagger::ServerVariable. |
# ServerVariable::description
Description.
DTO_FIELD(String, description)
# ServerVariable::enumValues
Enum values.
DTO_FIELD(List<String>, enumValues, "enum")
# ServerVariable::defaultValue
Default value.
DTO_FIELD(String, defaultValue, "default")
# ServerVariable::createFromBaseModel
Create ServerVariable from oatpp::swagger::ServerVariable.
- @param model - oatpp::swagger::ServerVariable.
- @return - ServerVariable.
static Wrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::ServerVariable>& model)
# Server
Server.
namespace oatpp { namespace swagger { namespace oas3 {
class Server : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | url | Url. |
String | description | Description. |
Fields<Object<ServerVariable>> | variables | Variables. |
# Methods
Return Type | Name | Summary |
---|---|---|
Wrapper | 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<Object<ServerVariable>>, variables)
# Server::createFromBaseModel
Create Server from oatpp::swagger::Server.
- @param model - oatpp::swagger::Server.
- @return - Server.
static Wrapper createFromBaseModel(const std::shared_ptr<oatpp::swagger::Server>& model)
# Schema
Schema.
namespace oatpp { namespace swagger { namespace oas3 {
class Schema : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | type | Type. Ex.: integer, string, etc. |
String | format | Format. Ex.: int32, int64, etc. |
String | description | Description of the field. |
Any | defaultValue | Default value for the field. |
String | pattern | Pattern value for the field. |
Int64 | minimum | Minimum value. |
Int64 | maximum | Maximum value. |
Fields<Object<Schema>> | properties | Map of oatpp::String to Schema. |
Object<Schema> | additionalProperties | Additional properties. |
Object<Schema> | items | Items. |
Boolean | uniqueItems | Items should be unique.
|
List<Any> | enumValues | Enum of possible values. |
List<String> | required | List of required fields. |
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::description
Description of the field.
DTO_FIELD(String, description)
# Schema::defaultValue
Default value for the field.
DTO_FIELD(Any, defaultValue, "default")
# Schema::pattern
Pattern value for the field.
DTO_FIELD(String, pattern, "pattern")
# Schema::minimum
Minimum value.
DTO_FIELD(Int64, minimum)
# Schema::maximum
Maximum value.
DTO_FIELD(Int64, maximum)
# Schema::properties
Map of oatpp::String to Schema.
DTO_FIELD(Fields<Object<Schema>>, properties)
# Schema::additionalProperties
Additional properties.
DTO_FIELD(Object<Schema>, additionalProperties)
# Schema::items
Items.
DTO_FIELD(Object<Schema>, items)
# Schema::uniqueItems
Items should be unique.
- @return
DTO_FIELD(Boolean, uniqueItems)
# Schema::enumValues
Enum of possible values.
DTO_FIELD(List<Any>, enumValues, "enum")
# Schema::required
List of required fields.
DTO_FIELD(List<String>, required, "required")
# Schema::ref
Ref.
DTO_FIELD(String, ref, "$ref")
# Example
Example.
namespace oatpp { namespace swagger { namespace oas3 {
class Example : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
Any | value | Example value. |
String | summary | Summary. |
# Example::value
Example value.
DTO_FIELD(Any, value)
# Example::summary
Summary.
DTO_FIELD(String, summary)
# MediaTypeObject
Media type object.
namespace oatpp { namespace swagger { namespace oas3 {
class MediaTypeObject : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
Object<Schema> | schema | Schema. |
Fields<Object<Example>> | examples | Examples. |
# MediaTypeObject::schema
DTO_FIELD(Object<Schema>, schema)
# MediaTypeObject::examples
Examples.
DTO_FIELD(Fields<Object<Example>>, examples)
# OAuthFlow
OAuth flow Object https://swagger.io/specification/#oauthFlowObject
namespace oatpp { namespace swagger { namespace oas3 {
class OAuthFlow : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | authorizationUrl | Authorization url. |
String | tokenUrl | Token url. |
String | refreshUrl | Refresh url. |
Fields<String> | 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>, scopes)
# OAuthFlows
OAuth Flows Object https://swagger.io/specification/#oauthFlowObject
namespace oatpp { namespace swagger { namespace oas3 {
class OAuthFlows : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
Object<OAuthFlow> | implicit | Implicit. |
Object<OAuthFlow> | password | Password. |
Object<OAuthFlow> | clientCredentials | Client credentials. |
Object<OAuthFlow> | authorizationCode | Authorization code. |
# OAuthFlows::implicit
Implicit.
DTO_FIELD(Object<OAuthFlow>, implicit)
# OAuthFlows::password
Password.
DTO_FIELD(Object<OAuthFlow>, password)
# OAuthFlows::clientCredentials
Client credentials.
DTO_FIELD(Object<OAuthFlow>, clientCredentials)
# OAuthFlows::authorizationCode
Authorization code.
DTO_FIELD(Object<OAuthFlow>, authorizationCode)
# SecurityScheme
Security Scheme object.
namespace oatpp { namespace swagger { namespace oas3 {
class SecurityScheme : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | type | Type. |
String | description | Description. |
String | name | Name. |
String | in | 'In'. |
String | scheme | Scheme. |
String | bearerFormat | Bearer format. |
Object<OAuthFlows> | 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(Object<OAuthFlows>, flows)
# SecurityScheme::openIdConnectUrl
Open id connect url.
DTO_FIELD(String, openIdConnectUrl)
# OperationResponse
Operation Response.
namespace oatpp { namespace swagger { namespace oas3 {
class OperationResponse : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | description | Description. |
Fields<Object<MediaTypeObject>> | content | MediaTypeObject. |
# OperationResponse::description
Description.
DTO_FIELD(String, description)
# OperationResponse::content
DTO_FIELD(Fields<Object<MediaTypeObject>>, content)
# RequestBody
Request body.
namespace oatpp { namespace swagger { namespace oas3 {
class RequestBody : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | description | Description. |
Boolean | required | Required. |
Fields<Object<MediaTypeObject>> | content | MediaTypeObject. |
# RequestBody::description
Description.
DTO_FIELD(String, description)
# RequestBody::required
Required.
DTO_FIELD(Boolean, required)
# RequestBody::content
DTO_FIELD(Fields<Object<MediaTypeObject>>, content)
# PathItemParameter
Path item parameter.
namespace oatpp { namespace swagger { namespace oas3 {
class PathItemParameter : public oatpp::DTO {}
}}}
# 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. |
Object<Schema> | schema | Parameter schema. Schema. |
Fields<Object<Example>> | examples | Examples. |
# 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(Object<Schema>, schema)
# PathItemParameter::examples
Examples.
DTO_FIELD(Fields<Object<Example>>, examples)
# PathItemOperation
Path item operation.
namespace oatpp { namespace swagger { namespace oas3 {
class PathItemOperation : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | description | Description. |
String | summary | Summary. |
String | operationId | Operation ID. |
Object<RequestBody> | requestBody | Request Body. |
List<String> | tags | List of tags. |
Fields<Object<OperationResponse>> | responses | Map of oatpp::String to OperationResponse. |
List<Object<PathItemParameter>> | parameters | List of PathItemParameter. |
List<Fields<List<String>>> | 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(Object<RequestBody>, requestBody)
# PathItemOperation::tags
List of tags.
DTO_FIELD(List<String>, tags)
# PathItemOperation::responses
Map of oatpp::String to OperationResponse.
DTO_FIELD(Fields<Object<OperationResponse>>, responses)
# PathItemOperation::parameters
List of PathItemParameter.
DTO_FIELD(List<Object<PathItemParameter>>, parameters)
# PathItemOperation::security
Security requirements.
DTO_FIELD(List<Fields<List<String>>>, security)
# PathItem
Path item.
namespace oatpp { namespace swagger { namespace oas3 {
class PathItem : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
Object<PathItemOperation> | operationGet | Operation GET. |
Object<PathItemOperation> | operationPut | Operation PUT. |
Object<PathItemOperation> | operationPost | Operation POST. |
Object<PathItemOperation> | operationDelete | Operation DELETE. |
Object<PathItemOperation> | operationOptions | Operation OPTIONS. |
Object<PathItemOperation> | operationHead | Operation HEAD. |
Object<PathItemOperation> | operationPatch | Operation PATCH. |
Object<PathItemOperation> | operationTrace | Operation TRACE. |
# PathItem::operationGet
Operation GET.
DTO_FIELD(Object<PathItemOperation>, operationGet, "get")
# PathItem::operationPut
Operation PUT.
DTO_FIELD(Object<PathItemOperation>, operationPut, "put")
# PathItem::operationPost
Operation POST.
DTO_FIELD(Object<PathItemOperation>, operationPost, "post")
# PathItem::operationDelete
Operation DELETE.
DTO_FIELD(Object<PathItemOperation>, operationDelete, "delete")
# PathItem::operationOptions
Operation OPTIONS.
DTO_FIELD(Object<PathItemOperation>, operationOptions, "options")
# PathItem::operationHead
Operation HEAD.
DTO_FIELD(Object<PathItemOperation>, operationHead, "head")
# PathItem::operationPatch
Operation PATCH.
DTO_FIELD(Object<PathItemOperation>, operationPatch, "patch")
# PathItem::operationTrace
Operation TRACE.
DTO_FIELD(Object<PathItemOperation>, operationTrace, "trace")
# Components
Component.
namespace oatpp { namespace swagger { namespace oas3 {
class Components : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
Fields<Object<Schema>> | schemas | Map of oatpp::String to Schema. |
Fields<Object<SecurityScheme>> | securitySchemes | Map of oatpp::String to SecurityScheme. |
# Components::schemas
Map of oatpp::String to Schema.
DTO_FIELD(Fields<Object<Schema>>, schemas)
# Components::securitySchemes
Map of oatpp::String to SecurityScheme.
DTO_FIELD(Fields<Object<SecurityScheme>>, securitySchemes)
# Document
Document.
namespace oatpp { namespace swagger { namespace oas3 {
class Document : public oatpp::DTO {}
}}}
# Fields
Type | Name | Summary |
---|---|---|
String | openapi | Open Api Version. |
Object<Info> | info | Info. |
List<Object<Server>> | servers | List of Server. |
Fields<Object<PathItem>> | paths | Map of oatpp::String to PathItem. |
Object<Components> | components | Components. |
# Document::openapi
Open Api Version.
DTO_FIELD(String, openapi, "openapi") = "3.0.0"
# Document::info
Info.
DTO_FIELD(Object<Info>, info)
# Document::servers
List of Server.
DTO_FIELD(List<Object<Server>>, servers)
# Document::paths
Map of oatpp::String to PathItem.
DTO_FIELD(Fields<Object<PathItem>>, paths)
# Document::components
DTO_FIELD(Object<Components>, components)