Documentation
¶
Overview ¶
Package validate checks arguments against the contract before a request goes out.
This is the most direct payoff of reading OpenAPI rather than linking a generated SDK. In generated Go a field is just `Name string`; it does not know it is capped at 128 characters, and `DiskTypeId string` does not know it must be a UUID. Those constraints exist only in the contract.
$ leaflow compute disk create --name <129 chars> --size-gb 0
error: --name is longer than 128 characters (got 129)
--size-gb must be at least 1 (got 0)
The alternative is a 400 written for API callers, which does not contain the word "--size-gb" and has to be translated back to the flag by hand.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.