gapitest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertOpenAPIMatchesSnapshot

func AssertOpenAPIMatchesSnapshot(t *testing.T, handler http.Handler, snapshotPath string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(handler http.Handler) Client

func (Client) DELETE

func (client Client) DELETE(path string) Request

func (Client) GET

func (client Client) GET(path string) Request

func (Client) PATCH

func (client Client) PATCH(path string) Request

func (Client) POST

func (client Client) POST(path string) Request

type Request

type Request struct {
	// contains filtered or unexported fields
}

func (Request) Cookie

func (request Request) Cookie(cookie *http.Cookie) Request

func (Request) Expect

func (request Request) Expect(t *testing.T) Response

func (Request) Header

func (request Request) Header(name, value string) Request

func (Request) JSON

func (request Request) JSON(value any) Request

type Response

type Response struct {
	Recorder *httptest.ResponseRecorder
	// contains filtered or unexported fields
}

func (Response) BodyString

func (response Response) BodyString(want string) Response

func (Response) Decode

func (response Response) Decode(target any) Response

func (Response) Status

func (response Response) Status(status int) Response

Jump to

Keyboard shortcuts

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