Documentation
¶
Overview ¶
Package codesamples generates the versioned CLI sample catalog consumed by the SumUp developer portal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
SchemaVersion int `json:"schemaVersion"`
Language string `json:"language"`
SDK SDK `json:"sdk"`
OpenAPIVersion string `json:"openAPIVersion"`
Samples []Sample `json:"samples"`
}
Catalog is the versioned JSON contract consumed by documentation sites.
type SDK ¶
SDK identifies the CLI package used by every generated sample. The field name is retained for compatibility with the shared portal catalog schema.
type Sample ¶
type Sample struct {
ID string `json:"id"`
OperationID string `json:"operationId"`
Example string `json:"example,omitempty"`
Summary string `json:"summary,omitempty"`
Description string `json:"description,omitempty"`
HTTPMethod string `json:"httpMethod"`
Path string `json:"path"`
Source string `json:"sample"`
}
Sample is one complete CLI invocation for an OpenAPI operation.
Click to show internal directories.
Click to hide internal directories.