validator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package validator is needed to validate response payload against a JSON-Schema

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ValidationError

type ValidationError struct {
	// contains filtered or unexported fields
}

ValidationError encapsulate gojsonschema result errors

func (ValidationError) Error

func (e ValidationError) Error() (message string)

type Validator

type Validator struct {
	// SchemaReference points to a file or an url
	SchemaReference string
	// contains filtered or unexported fields
}

Validator can validate []byte response against his json schema

func (*Validator) Validate

func (v *Validator) Validate(resp []byte) error

Validate the given response against the json schema

Jump to

Keyboard shortcuts

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