validation

package
v0.0.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(strList []string, str string) bool

func ValidateJSONSchema

func ValidateJSONSchema(jsonInput []byte, desiredSchemaURI string) error

ValidateJSONSchema performs the JSON Schema validation: https://json-schema.org/ This fetches the schema definition via http(s) or local filesystem. If jsonInput is not a valid JSON or if jsonInput doesn't conform to the desired JSON schema, an error is returned.

TODO: accept io.Reader instead of []byte

func ValidateJSONSchemata

func ValidateJSONSchemata(jsonInput []byte, desiredSchemaURIs []string) error

ValidateJSONSchemata gets data from desiredSchemaURI list one by one and calls ValidateJSONSchema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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