Documentation
¶
Overview ¶
Package mock serves an OpenAPI mock over HTTP (sonde mock): the net/http side of openapi.Mock, which chooses and renders responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// ValidateRequests answers a request that does not match its
// operation with a 415 or 422 problem instead of a response.
ValidateRequests bool
// CORS answers preflight requests and allows any origin.
CORS bool
// Log receives one line per request and generator warnings (nil:
// none). Bodies are never logged.
Log io.Writer
}
Options configure the handler.
Click to show internal directories.
Click to hide internal directories.