Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperationInfo ¶
type OperationInfo struct {
Name string `json:"name"`
Method string `json:"method"`
Path string `json:"path"`
Summary string `json:"summary,omitempty"`
Description string `json:"description,omitempty"`
Parameters []ParameterInfo `json:"parameters,omitempty"`
HasRequestBody bool `json:"has_request_body,omitempty"`
RequiredScope string `json:"required_scope,omitempty"`
}
OperationInfo describes a single API operation.
type ParameterInfo ¶
type ParameterInfo struct {
Name string `json:"name"`
In string `json:"in"`
Required bool `json:"required"`
Type string `json:"type"`
}
ParameterInfo describes a single parameter of an API operation.
type ResourceInfo ¶
type ResourceInfo struct {
Resource string `json:"resource"`
Operations []OperationInfo `json:"operations"`
}
ResourceInfo describes a CLI resource and its available API operations.
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
Schema holds the parsed OpenAPI spec and provides methods to query it.
func (*Schema) Describe ¶
func (s *Schema) Describe(resource string) (*ResourceInfo, error)
Describe returns detailed information about all operations for a given CLI resource.
func (*Schema) ListResources ¶
ListResources returns a sorted list of available CLI resource names.
Click to show internal directories.
Click to hide internal directories.