revisor

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Build Status Coverage Status

Revisor toolkit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreBasePath added in v0.0.4

func IgnoreBasePath(a *apiVerifier)

IgnoreBasePath disables check if request path is contains base path configured in API document. By default, base path is always checked.

func NewRequestVerifier

func NewRequestVerifier(definitionPath string, options ...option) (func(*http.Request) error, error)

NewRequestVerifier returns a function that can be used to verify if request satisfies OpenAPI definition constraints

func NewVerifier

func NewVerifier(definitionPath string, options ...option) (func(*http.Response, *http.Request) error, error)

NewVerifier returns a function that can be used to verify both - a request and the response made in the context of the request

func NoStrictContentType added in v0.0.3

func NoStrictContentType(a *apiVerifier)

NoStrictContentType disables strict content-type validation which is enabled by default. StrictContentType validation will raise errors in the following cases:

  • content-type header doesn't fully match content-types listed in consumes or produces section for request and response correspondingly
  • consumes or produces section are not configured for current request request and response correspondingly

Types

This section is empty.

Jump to

Keyboard shortcuts

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