Documentation
¶
Index ¶
Constants ¶
View Source
const CodegenHeader = "// Code generated by jamf-cli generator. DO NOT EDIT."
CodegenHeader is the marker line at the top of every modern API generated file. Must match the first line of resourceTemplate and registryTemplate.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates Go code from parsed resources
func NewGenerator ¶
NewGenerator creates a new code generator
type Operation ¶
type Operation struct {
Name string // e.g., "list", "get", "create"
Method string // HTTP method
Path string // API path
Summary string
Description string
Parameters []*Parameter
RequestBody *RequestBody
Responses map[string]*Response
IsAction bool // x-action: true
IsDestructive bool // Requires confirmation (delete, erase, etc.)
IsList bool // List operation with pagination support
APIVersion string // v1, v2, preview, etc.
Privileges []string // x-required-privileges
}
Operation represents an API operation (endpoint)
type Parameter ¶
type Parameter struct {
Name string
In string // "query", "path"
Description string
Required bool
Type string
Default any
IsArray bool
}
Parameter represents a query/path parameter
type Property ¶
type Property struct {
Name string
Type string
Description string
Example any
Nullable bool
ReadOnly bool
}
Property represents a schema property
type RequestBody ¶
RequestBody represents a request body
type Resource ¶
type Resource struct {
Name string // e.g., "buildings"
NameSingular string // e.g., "building"
GoName string // e.g., "Buildings"
Description string
Operations []*Operation
Schemas map[string]*Schema
NameField string // Filter field for name lookups (default "name", some use "displayName")
}
Resource represents a parsed API resource (e.g., buildings, computers)
Click to show internal directories.
Click to hide internal directories.