Models generation options. More...
#include <modelGenerator.hpp>
Public Attributes | |
| std::string | ns = "model" |
| std::string | name = "models" |
| bool | uuid = true |
| bool | date = true |
| bool | strict = false |
| bool | constraints = true |
| bool | server = false |
| bool | client = false |
| std::string | api |
Models generation options.
| std::string anch::oas::ModelOptions::api |
API name: service is <api>Service and client is <api>Client (default: document title in PascalCase)
| bool anch::oas::ModelOptions::client = false |
Generate endpoints client side ( paths ): typed client based on anch::rest::Client (<name>-client.hpp and <name>-client.cpp)
| bool anch::oas::ModelOptions::constraints = true |
Generate value constraints ( minLength , minimum , minItems , ...) in mappers. Required properties are always checked.
| bool anch::oas::ModelOptions::date = true |
Map date-time string format to anch::date::DateTime and date format to anch::date::Date (RFC 3339, needs ANCH_DATE in anch-json), std::string otherwise
| std::string anch::oas::ModelOptions::name = "models" |
Generated files base name: <name>.hpp and <name>.cpp
| std::string anch::oas::ModelOptions::ns = "model" |
Namespace of generated models (:: separated identifiers)
| bool anch::oas::ModelOptions::server = false |
Generate endpoints server side ( paths ): service interface and its registration in anch::rest::Api (<name>-server.hpp and <name>-server.cpp)
| bool anch::oas::ModelOptions::strict = false |
Raise an error on unsupported schema instead of skipping it with a warning
| bool anch::oas::ModelOptions::uuid = true |
Map uuid string format to anch::UUID (needs ANCH_UUID in anch-json), std::string otherwise