Documentation
¶
Overview ¶
Package gen provides code generation from OpenAPI specs.
Index ¶
Constants ¶
const ( // Unified spec paths (v1+v2 combined in single files) PathUnifiedSpec = "../../api/openapi-spec/spec3.cli.json" PathUnifiedPreviewSpec = "../../api/openapi-spec/spec3.cli.preview.json" )
OpenAPI spec file paths shared across code generation tools
Variables ¶
This section is empty.
Functions ¶
func FirstSentence ¶ added in v1.40.4
FirstSentence returns the first sentence of s using a lightweight heuristic. Paragraph breaks ("\n\n") are always a boundary. Otherwise it splits on ". " or ".\n" where canEndSentence holds for the character before the period and canStartSentence holds for the character after the separator. Known abbreviations (e.g., "e.g", "i.e") are never split on.
func GetType ¶
GetType accepts a schema and returns its scalar type, if it has one.
If the schema is monomorphic, it returns its type if it's scalar.
If the schema is polymorphic, it returns the first scalar type for the schema, if there is any.
func IsClearableObject ¶ added in v1.40.3
IsClearableObject reports whether s uses the anyOf clearable-object pattern: one object branch and one empty-string-only branch. This is the Stripe v1 API convention for optional nested objects that can be removed by passing "".
Types ¶
This section is empty.