11#ifndef RFL_JSON_SCHEMA_TYPE_HPP_
22#define RFL_JSON_SCHEMA_TYPE_HPP_
33
4- #include < map>
54#include < memory>
65#include < optional>
76#include < string>
@@ -16,125 +15,125 @@ namespace rfl::json::schema {
1615// / The JSON representation of internal::schema::Type.
1716struct Type {
1817 struct Boolean {
19- std::optional<std::string> description;
20- Literal<" boolean" > type;
18+ std::optional<std::string> description{} ;
19+ Literal<" boolean" > type{} ;
2120 };
2221
2322 struct Integer {
24- Literal<" integer" > type;
25- std::optional<std::string> description;
23+ Literal<" integer" > type{} ;
24+ std::optional<std::string> description{} ;
2625 };
2726
2827 struct Number {
29- Literal<" number" > type;
30- std::optional<std::string> description;
28+ Literal<" number" > type{} ;
29+ std::optional<std::string> description{} ;
3130 };
3231
3332 struct String {
34- Literal<" string" > type;
35- std::optional<std::string> description;
36- rfl::Rename<" minLength" , std::optional<size_t >> minSize;
37- rfl::Rename<" maxLength" , std::optional<size_t >> maxSize;
33+ Literal<" string" > type{} ;
34+ std::optional<std::string> description{} ;
35+ rfl::Rename<" minLength" , std::optional<size_t >> minSize{} ;
36+ rfl::Rename<" maxLength" , std::optional<size_t >> maxSize{} ;
3837 };
3938
4039 using NumericType = rfl::Variant<Integer, Number>;
4140
4241 struct AllOf {
43- std::optional<std::string> description;
44- std::vector<Type> allOf;
42+ std::optional<std::string> description{} ;
43+ std::vector<Type> allOf{} ;
4544 };
4645
4746 struct AnyOf {
48- std::optional<std::string> description;
49- std::vector<Type> anyOf;
47+ std::optional<std::string> description{} ;
48+ std::vector<Type> anyOf{} ;
5049 };
5150
5251 struct ExclusiveMaximum {
53- std::optional<std::string> description;
54- rfl::Variant<double , int > exclusiveMaximum;
55- std::string type;
52+ std::optional<std::string> description{} ;
53+ rfl::Variant<double , int > exclusiveMaximum{} ;
54+ std::string type{} ;
5655 };
5756
5857 struct ExclusiveMinimum {
59- std::optional<std::string> description;
60- rfl::Variant<double , int > exclusiveMinimum;
61- std::string type;
58+ std::optional<std::string> description{} ;
59+ rfl::Variant<double , int > exclusiveMinimum{} ;
60+ std::string type{} ;
6261 };
6362
6463 struct FixedSizeTypedArray {
65- Literal<" array" > type;
66- std::optional<std::string> description;
67- rfl::Ref<Type> items;
68- size_t minItems;
69- size_t maxItems;
64+ Literal<" array" > type{} ;
65+ std::optional<std::string> description{} ;
66+ rfl::Ref<Type> items{} ;
67+ size_t minItems{} ;
68+ size_t maxItems{} ;
7069 };
7170
7271 struct Maximum {
73- std::optional<std::string> description;
74- rfl::Variant<double , int > maximum;
75- std::string type;
72+ std::optional<std::string> description{} ;
73+ rfl::Variant<double , int > maximum{} ;
74+ std::string type{} ;
7675 };
7776
7877 struct Minimum {
79- std::optional<std::string> description;
80- rfl::Variant<double , int > minimum;
81- std::string type;
78+ std::optional<std::string> description{} ;
79+ rfl::Variant<double , int > minimum{} ;
80+ std::string type{} ;
8281 };
8382
8483 struct Null {
85- Literal<" null" > type;
86- std::optional<std::string> description;
84+ Literal<" null" > type{} ;
85+ std::optional<std::string> description{} ;
8786 };
8887
8988 struct Object {
90- Literal<" object" > type;
91- std::optional<std::string> description;
92- rfl::Object<Type> properties;
93- std::vector<std::string> required;
94- std::shared_ptr<Type> additionalProperties;
89+ Literal<" object" > type{} ;
90+ std::optional<std::string> description{} ;
91+ rfl::Object<Type> properties{} ;
92+ std::vector<std::string> required{} ;
93+ std::shared_ptr<Type> additionalProperties{} ;
9594 };
9695
9796 struct OneOf {
98- std::optional<std::string> description;
99- std::vector<Type> oneOf;
97+ std::optional<std::string> description{} ;
98+ std::vector<Type> oneOf{} ;
10099 };
101100
102101 struct Reference {
103- Rename<" $ref" , std::optional<std::string>> ref;
104- std::optional<std::string> description;
102+ Rename<" $ref" , std::optional<std::string>> ref{} ;
103+ std::optional<std::string> description{} ;
105104 };
106105
107106 struct Regex {
108- Literal<" string" > type;
109- std::optional<std::string> description;
110- std::string pattern;
107+ Literal<" string" > type{} ;
108+ std::optional<std::string> description{} ;
109+ std::string pattern{} ;
111110 };
112111
113112 struct StringEnum {
114- Literal<" string" > type;
115- std::optional<std::string> description;
116- rfl::Rename<" enum" , std::vector<std::string>> values;
113+ Literal<" string" > type{} ;
114+ std::optional<std::string> description{} ;
115+ rfl::Rename<" enum" , std::vector<std::string>> values{} ;
117116 };
118117
119118 struct StringMap {
120- Literal<" object" > type;
121- std::optional<std::string> description;
122- rfl::Ref<Type> additionalProperties;
119+ Literal<" object" > type{} ;
120+ std::optional<std::string> description{} ;
121+ rfl::Ref<Type> additionalProperties{} ;
123122 };
124123
125124 struct Tuple {
126- Literal<" array" > type;
127- std::optional<std::string> description;
128- std::vector<Type> prefixItems;
125+ Literal<" array" > type{} ;
126+ std::optional<std::string> description{} ;
127+ std::vector<Type> prefixItems{} ;
129128 bool items = false ;
130129 };
131130
132131 struct TypedArray {
133- Literal<" array" > type;
134- std::optional<std::string> description;
135- rfl::Ref<Type> items;
136- rfl::Rename<" minItems" , std::optional<size_t >> minSize;
137- rfl::Rename<" maxItems" , std::optional<size_t >> maxSize;
132+ Literal<" array" > type{} ;
133+ std::optional<std::string> description{} ;
134+ rfl::Ref<Type> items{} ;
135+ rfl::Rename<" minItems" , std::optional<size_t >> minSize{} ;
136+ rfl::Rename<" maxItems" , std::optional<size_t >> maxSize{} ;
138137 };
139138
140139 using ReflectionType =
0 commit comments