apitest

package
v0.0.0-...-b9a5b38 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package apitest validates HTTP exchanges against the OpenAPI contract. Every API test routes through Conformance so the implementation cannot drift from api/openapi.yaml.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

Check serves req through h and returns an error describing any contract violation in the request or the response.

func Do

Do serves req through h and fails the test if the request or the response does not conform to the contract. Undocumented routes fail too.

func SchemaEnum

func SchemaEnum(t testing.TB, name string) []string

SchemaEnum returns the enum values of components.schemas[name].

Types

This section is empty.

Jump to

Keyboard shortcuts

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