Github   Telegram
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
yaml_config::Schema Struct Referencefinal

JSON Schema-like type definition. More...

#include <userver/yaml_config/schema.hpp>

+ Collaboration diagram for yaml_config::Schema:

Public Member Functions

void UpdateDescription (std::string new_description)

Static Public Member Functions

static Schema EmptyObject ()

Public Attributes

std::string path
FieldType type {}
std::string description
std::optional< std::string > default_description
std::optional< std::variant< bool, SchemaPtr > > additional_properties
std::optional< std::unordered_map< std::string, SchemaPtr > > properties
std::optional< SchemaPtritems
std::optional< std::unordered_set< std::string > > enum_values
std::optional< double > minimum
std::optional< double > maximum

Detailed Description

JSON Schema-like type definition.

See also
Static configs validation
components/component_sample_test.cpp, components/component_sample_test.hpp, samples/grpc_service/grpc_service.cpp, samples/http_caching/http_caching.cpp, and samples/tcp_service/tcp_service.cpp.

Definition at line 47 of file schema.hpp.

Member Data Documentation

◆ additional_properties

std::optional<std::variant<bool, SchemaPtr> > yaml_config::Schema::additional_properties

Definition at line 57 of file schema.hpp.

◆ default_description

std::optional<std::string> yaml_config::Schema::default_description

Definition at line 56 of file schema.hpp.

◆ description

std::string yaml_config::Schema::description

Definition at line 55 of file schema.hpp.

◆ enum_values

std::optional<std::unordered_set<std::string> > yaml_config::Schema::enum_values

Definition at line 60 of file schema.hpp.

◆ items

std::optional<SchemaPtr> yaml_config::Schema::items

Definition at line 59 of file schema.hpp.

◆ maximum

std::optional<double> yaml_config::Schema::maximum

Definition at line 62 of file schema.hpp.

◆ minimum

std::optional<double> yaml_config::Schema::minimum

Definition at line 61 of file schema.hpp.

◆ path

std::string yaml_config::Schema::path

Definition at line 52 of file schema.hpp.

◆ properties

std::optional<std::unordered_map<std::string, SchemaPtr> > yaml_config::Schema::properties

Definition at line 58 of file schema.hpp.

◆ type

FieldType yaml_config::Schema::type {}

Definition at line 54 of file schema.hpp.

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