merger

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractSchemaDefinition

func ExtractSchemaDefinition(object map[string]any) (map[string]any, error)

ExtractSchemaDefinition extracts the actual schema definition from the wider structure, which includes $ref, $schema, etc.

func MergeSchemas

func MergeSchemas(source, target map[string]any) (map[string]any, error)

MergeSchemas merges a source schema onto a target one, applying various validations,,

func ValidateSchemaProperty

func ValidateSchemaProperty(property map[string]any, name string) error

ValidateSchemaProperty recursively runs a minimal validation on schema property, which is not performed by the gojsonlibrary we're currently using. It checks that: a property of type "object" has a map of properties, named "properties" a property of type "array" has the definition of each item as "items" the attribute "anyOf", in a property with no type, is a list of properties

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL