Documentation
¶
Overview ¶
Package openapi validates JSON responses against OpenAPI 3 and Swagger 2 documents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CachedSpec ¶
CachedSpec reads a checksum-pinned API description. The file is populated by internal/conform/specs/fetch.sh; it is never fetched during an offline test.
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func (*Document) ValidExtra ¶
func (d *Document) ValidExtra(method, path string, status int, contentType string, body []byte, field string) bool
ValidExtra reports whether every actual occurrence of a collapsed JSON path is explicitly described by the matched response schema and validates there. Unknown schema constructs, absent paths and invalid JSON fail closed.
Click to show internal directories.
Click to hide internal directories.