Get
Print the Go SDK: its packages, how a call works, its types and its services.
The list comes from this binary, from types.All and client.Services. Thus it agrees with the build that you run. The SDK skill is made from it.
osapi sdk spec get
Examples
osapi sdk spec get
osapi sdk spec get --json
Result
The command prints:
$ osapi sdk spec get Packages: github.com/osapi-io/osapi/pkg/sdk/client Calls the API of the controller: client.New(url, token) is a Client, and each service of the API is a field of it, such as c.Hostname. Use: In a program that calls osapi. The services below are its fields. github.com/osapi-io/osapi/pkg/sdk/types The vocabulary of the API: the permissions, the roles, the targets and each closed set of values, as types with constants. Use: For each value of a closed set: a constant such as types.ContentRaw, never a string.
With --json, the command prints:
{
"kinds": [
{
"kind": "package",
"title": "Packages",
"terms": [
{
"kind": "package",
"name": "github.com/osapi-io/osapi/pkg/sdk/client",
"does": "Calls the API of the controller: client.New(url, token) is a Client, and each service of the API is a field of it, such as c.Hostname.",
"when": "In a program that calls osapi. The services below are its fields."
},
{
"kind": "package",
"name": "github.com/osapi-io/osapi/pkg/sdk/types",
"does": "The vocabulary of the API: the permissions, the roles, the targets and each closed set of values, as types with constants.",
"when": "For each value of a closed set: a constant such as types.ContentRaw, never a string."
}
]
}
]
}
Global flags
| Flag | Description | Default |
|---|---|---|
-d, --debug | Enable or disable debug mode | |
-j, --json | Enable JSON output | |
-f, --osapi-file | Path to config file; without one at the default path, osapi runs on the defaults | /etc/osapi/osapi.yaml |
Output tells how the result is printed, and what --json
gives.