Documentation
¶
Overview ¶
Package mocks wraps libopenapi's mock generator with the handling its three failure modes need: it panics on some inputs, it reports an exhausted work budget through a sentinel error rather than a failure, and it can return a payload far larger than a caller wants to embed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SafeGenerate ¶
func SafeGenerate( gen *renderer.MockGenerator, mockable any, label string, maxBytes int, warn WarnFunc, ) (mock []byte, err error)
SafeGenerate renders mockable, returning nil when the result has to be thrown away. label identifies the subject in any warning.
A zero or negative maxBytes disables the size ceiling.
Types ¶
Click to show internal directories.
Click to hide internal directories.