mapped_json_schema

pub version

Highly customizable JSON Schema object model mapper.

Usage

  • Create JsonSchema object;
  • Convert JsonSchema into MappedJsonSchema;
  • Use it!

For more information on the usage, please, check example/.

Implementation

MappedJsonSchemaParser is designed to convert JSON Schema into MappedJsonSchema. It has a customMappers parameter which is allowing to customize property-to-mapped-object mapping.

MappedJsonSchema contains the original JsonSchema object for the reference and a list of mapped properties MappedProperty.

MappedProperty have the following implementations:

  • MappedObjectProperty
  • MappedValueProperty, which is inherited in:
    • BooleanMappedProperty
    • StringMappedProperty
    • EnumMappedProperty
    • NumberMappedProperty
    • ArrayMappedProperty

MappedProperty is open for extension if special property needs to be implemented.

Libraries

mapped_json_schema