schemas

package
v0.0.0-...-de2618e Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CoefficientsSchema = `` /* 445-byte string literal not displayed */

CoefficientsSchema gets the json schema to update coefficients

View Source
const DeleteEpcContextSchema = `` /* 255-byte string literal not displayed */

DeleteEpcContextSchema defines the body which deletes the epc context for the specific tag

View Source
const PostCurrentInventorySchema = `` /* 291-byte string literal not displayed */
View Source
const PurgingSchema = `` /* 151-byte string literal not displayed */

PurgingSchema gets the json schema to update purging days

View Source
const SearchByEpcSchema = `` /* 395-byte string literal not displayed */

SearchByEpcSchema defines the request body for searchbyepc endpoint the pattern only allows at most one '*'

View Source
const SearchByProductIdSchema = `` /* 515-byte string literal not displayed */

SearchByProductIDSchema required for request body validation

View Source
const SetEpcContextSchema = `` /* 321-byte string literal not displayed */

SetEpcContextSchema defines the body which sets the epc context for the specific tag

View Source
const UpdateQualifiedStateSchema = `` /* 330-byte string literal not displayed */

UpdateQualifiedStateSchema required for request body validation

Variables

This section is empty.

Functions

func BuildErrorsString

func BuildErrorsString(resultsErrors []gojsonschema.ResultError) interface{}

BuildErrorsString concatenates errors and builds pretty error strings

func ValidateSchemaRequest

func ValidateSchemaRequest(jsonBody []byte, schema string) (*gojsonschema.Result, error)

ValidateSchemaRequest validates the api request body with the required json schema

Types

type ErrReport

type ErrReport struct {
	Field       string      `json:"field"`
	ErrorType   string      `json:"errortype"`
	Value       interface{} `json:"value"`
	Description string      `json:"description"`
}

ErrReport is used to wrap schema validation errors int json object

type ErrorList

type ErrorList struct {
	// The error list
	//in:body
	Errors []ErrReport `json:"errors"`
}

ErrorList provides a collection of errors for processing

Jump to

Keyboard shortcuts

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