diff --git a/include/rfl/generic/Writer.hpp b/include/rfl/generic/Writer.hpp index d97c05aa..4d8c51ca 100644 --- a/include/rfl/generic/Writer.hpp +++ b/include/rfl/generic/Writer.hpp @@ -2,20 +2,12 @@ #define GENERIC_WRITER_HPP_ #include -#include -#include -#include -#include -#include -#include #include #include #include #include #include "../Generic.hpp" -#include "../Result.hpp" -#include "../Variant.hpp" #include "../always_false.hpp" namespace rfl::generic { diff --git a/include/rfl/generic/write.hpp b/include/rfl/generic/write.hpp index f2019ca0..401c6927 100644 --- a/include/rfl/generic/write.hpp +++ b/include/rfl/generic/write.hpp @@ -1,11 +1,6 @@ #ifndef GENERIC_WRITE_HPP_ #define GENERIC_WRITE_HPP_ -#include -#include -#include -#include - #include "../Generic.hpp" #include "../parsing/Parent.hpp" #include "Parser.hpp" diff --git a/include/rfl/json/schema/JSONSchema.hpp b/include/rfl/json/schema/JSONSchema.hpp index 7aedfb7b..80e134ae 100644 --- a/include/rfl/json/schema/JSONSchema.hpp +++ b/include/rfl/json/schema/JSONSchema.hpp @@ -3,7 +3,6 @@ #include #include -#include #include "../../Flatten.hpp" #include "../../Literal.hpp" @@ -15,9 +14,9 @@ namespace rfl::json::schema { template struct JSONSchema { Rename<"$schema", Literal<"https://json-schema.org/draft/2020-12/schema">> - schema; - Flatten root; - std::map definitions; + schema{}; + Flatten root{}; + std::map definitions{}; }; } // namespace rfl::json::schema diff --git a/include/rfl/json/schema/Type.hpp b/include/rfl/json/schema/Type.hpp index 964354d8..4630a296 100644 --- a/include/rfl/json/schema/Type.hpp +++ b/include/rfl/json/schema/Type.hpp @@ -1,7 +1,6 @@ #ifndef RFL_JSON_SCHEMA_TYPE_HPP_ #define RFL_JSON_SCHEMA_TYPE_HPP_ -#include #include #include #include @@ -16,125 +15,125 @@ namespace rfl::json::schema { /// The JSON representation of internal::schema::Type. struct Type { struct Boolean { - std::optional description; - Literal<"boolean"> type; + std::optional description{}; + Literal<"boolean"> type{}; }; struct Integer { - Literal<"integer"> type; - std::optional description; + Literal<"integer"> type{}; + std::optional description{}; }; struct Number { - Literal<"number"> type; - std::optional description; + Literal<"number"> type{}; + std::optional description{}; }; struct String { - Literal<"string"> type; - std::optional description; - rfl::Rename<"minLength", std::optional> minSize; - rfl::Rename<"maxLength", std::optional> maxSize; + Literal<"string"> type{}; + std::optional description{}; + rfl::Rename<"minLength", std::optional> minSize{}; + rfl::Rename<"maxLength", std::optional> maxSize{}; }; using NumericType = rfl::Variant; struct AllOf { - std::optional description; - std::vector allOf; + std::optional description{}; + std::vector allOf{}; }; struct AnyOf { - std::optional description; - std::vector anyOf; + std::optional description{}; + std::vector anyOf{}; }; struct ExclusiveMaximum { - std::optional description; - rfl::Variant exclusiveMaximum; - std::string type; + std::optional description{}; + rfl::Variant exclusiveMaximum{}; + std::string type{}; }; struct ExclusiveMinimum { - std::optional description; - rfl::Variant exclusiveMinimum; - std::string type; + std::optional description{}; + rfl::Variant exclusiveMinimum{}; + std::string type{}; }; struct FixedSizeTypedArray { - Literal<"array"> type; - std::optional description; - rfl::Ref items; - size_t minItems; - size_t maxItems; + Literal<"array"> type{}; + std::optional description{}; + rfl::Ref items{}; + size_t minItems{}; + size_t maxItems{}; }; struct Maximum { - std::optional description; - rfl::Variant maximum; - std::string type; + std::optional description{}; + rfl::Variant maximum{}; + std::string type{}; }; struct Minimum { - std::optional description; - rfl::Variant minimum; - std::string type; + std::optional description{}; + rfl::Variant minimum{}; + std::string type{}; }; struct Null { - Literal<"null"> type; - std::optional description; + Literal<"null"> type{}; + std::optional description{}; }; struct Object { - Literal<"object"> type; - std::optional description; - rfl::Object properties; - std::vector required; - std::shared_ptr additionalProperties; + Literal<"object"> type{}; + std::optional description{}; + rfl::Object properties{}; + std::vector required{}; + std::shared_ptr additionalProperties{}; }; struct OneOf { - std::optional description; - std::vector oneOf; + std::optional description{}; + std::vector oneOf{}; }; struct Reference { - Rename<"$ref", std::optional> ref; - std::optional description; + Rename<"$ref", std::optional> ref{}; + std::optional description{}; }; struct Regex { - Literal<"string"> type; - std::optional description; - std::string pattern; + Literal<"string"> type{}; + std::optional description{}; + std::string pattern{}; }; struct StringEnum { - Literal<"string"> type; - std::optional description; - rfl::Rename<"enum", std::vector> values; + Literal<"string"> type{}; + std::optional description{}; + rfl::Rename<"enum", std::vector> values{}; }; struct StringMap { - Literal<"object"> type; - std::optional description; - rfl::Ref additionalProperties; + Literal<"object"> type{}; + std::optional description{}; + rfl::Ref additionalProperties{}; }; struct Tuple { - Literal<"array"> type; - std::optional description; - std::vector prefixItems; + Literal<"array"> type{}; + std::optional description{}; + std::vector prefixItems{}; bool items = false; }; struct TypedArray { - Literal<"array"> type; - std::optional description; - rfl::Ref items; - rfl::Rename<"minItems", std::optional> minSize; - rfl::Rename<"maxItems", std::optional> maxSize; + Literal<"array"> type{}; + std::optional description{}; + rfl::Ref items{}; + rfl::Rename<"minItems", std::optional> minSize{}; + rfl::Rename<"maxItems", std::optional> maxSize{}; }; using ReflectionType =