jsonschema

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 11 Imported by: 2

README

krakend-jsonschema

A JSON schema validator for the KrakenD API Gateway

Usage

Include in your krakend.json the JSON Schema configuration associated to every endpoint needing it. For instance:

{
	"version": "2",
	"endpoints": [
		{
			"endpoint": "/foo",
			"extra_config": {
				"github.com/devopsfaith/krakend-jsonschema": {
					YOUR SCHEMA HERE
				}
			}
		}  
	]
}

The configuration key "github.com/devopsfaith/krakend-jsonschema" takes directly as value the schema definition. Examples of schema can be found here

Documentation

Index

Constants

View Source
const Namespace = "github.com/devopsfaith/krakend-jsonschema"

Variables

View Source
var ErrEmptyBody = errors.New("could not validate an empty body")

Functions

func ProxyFactory

func ProxyFactory(pf proxy.Factory) proxy.FactoryFunc

ProxyFactory creates an proxy factory over the injected one adding a JSON Schema validator middleware to the pipe when required

Types

This section is empty.

Jump to

Keyboard shortcuts

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