Repository navigation
Add SchemaName, SchemaExtension, IntegerBounds, TupleBounds, OmitEmptyRequired, and flattened optional<variant> anyOf - #121
Open
clockblocker wants to merge 2 commits into
Open
clockblocker wants to merge 2 commits into
clockblocker wants to merge 2 commits into
Conversation
…yRequired, and flattened optional<variant> anyOf
… Validator before inline_schema, hoist apply_schema_annotations, and clean up nits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds opt-in JSON Schema customization and Draft 2020-12 polish:
rfl::SchemaName<T>(static constexpr std::string_view valueorstatic std::string value()) for clean$defsnames.rfl::SchemaExtension<T>for per-typetitle,examples,x-*extensions, andinline_schema(without bypassingLiteralorValidatorconstraints).rfl::IntegerBoundsprocessor emitting signed/unsigned integer width bounds (minimum/maximum) for fixed-width integer types.rfl::TupleBoundsprocessor emitting Draft 2020-12minItems/maxItemsalongsideprefixItemsfor fixed-size tuples.rfl::OmitEmptyRequiredprocessor omitting empty"required":[]arrays.std::optional<std::variant<...>>anyOfschema representation (deduplicating"type":"null")."type"-before-"default"property ordering; preserves ABI compatibility on legacyto_schema_internal_schemaoverload.Type::BoundedInteger/Type::Annotatedhandling across JSON, Avro, and Cap'n Proto schema emitters.Verification
-Wall -Werror+REFLECTCPP_STRICT_WARNINGS=ON: 666/666 passed.APPROVE).