vulkro openapi
Generates an OpenAPI 3.1 specification from the endpoints Vulkro finds in your code.
vulkro openapi . # JSON to stdout
vulkro openapi . --format yaml -o spec.yaml
Flags
| Flag | Description |
|---|---|
--format <FORMAT> | json (default) or yaml. |
-o, --output <FILE> | Write to a file instead of stdout. |
--project-name <NAME> | Set info.title. |
--project-version <VER> | Set info.version. |
What you get
- One operation per path and method.
HEAD,OPTIONSandANYare skipped. - Path parameters as
in: pathstrings. Types are not inferred. - A
200response on every operation. security: [{ bearerAuth: [] }]on protected endpoints.- Extensions from the auth model:
x-vulkro-tier,x-vulkro-scopes,x-vulkro-tenant-scoped.
paths:
/users/{id}:
get:
operationId: users_show_get
parameters:
- { name: id, in: path, required: true, schema: { type: string } }
responses:
'200': { description: Success }
security:
- bearerAuth: []
x-vulkro-tier: user
Exit codes
0 spec written. 2 scan or IO error.
See also: vulkro discover, vulkro rbac.
Command reference
Generated from vulkro openapi --help (vulkro 0.41.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.
Generate an OpenAPI specification from the endpoints found in the code.
vulkro openapi [OPTIONS] [PATH]
Arguments
| Argument | Description |
|---|---|
[PATH] | [default: .]. Default: .. |
Options
| Flag | Description |
|---|---|
-o, --output <OUTPUT> | |
--offline | Hard-disable every outbound network call for this run (sets VULKRO_OFFLINE=1). Blocks the CVE feed, the license heartbeat, the update check, webhooks, and any cloud AI endpoint; a loopback model (http://127.0.0.1, http://localhost) is still allowed. Equivalent to exporting VULKRO_OFFLINE=1, and the flag wins when both are set. |
-f, --format <FORMAT> | [default: json] [possible values: json, yaml]. Default: json. Possible values: json, yaml. |
-q, --quiet | Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged. |
--no-color | Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb. |
--project-name <PROJECT_NAME> | |
--project-version <PROJECT_VERSION> | |
-h, --help | Print help (see a summary with '-h') |
Full vulkro openapi --help
Generate an OpenAPI specification from the endpoints found in the code.
Generate an OpenAPI 3.1 spec from vulkro's discovered endpoints. Inverse of the spec-vs-code drift check in `discover`: synthesises a spec from the code rather than comparing against an existing one.
Exit code: 0 spec written (to stdout or `--output`), 2 scan / IO error.
Usage: vulkro openapi [OPTIONS] [PATH]
Arguments:
[PATH]
[default: .]
Options:
-o, --output <OUTPUT>
--offline
Hard-disable every outbound network call for this run (sets VULKRO_OFFLINE=1). Blocks the CVE feed, the license heartbeat, the update check, webhooks, and any cloud AI endpoint; a loopback model (http://127.0.0.1, http://localhost) is still allowed. Equivalent to exporting VULKRO_OFFLINE=1, and the flag wins when both are set
-f, --format <FORMAT>
[default: json]
[possible values: json, yaml]
-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged
--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb
--project-name <PROJECT_NAME>
--project-version <PROJECT_VERSION>
-h, --help
Print help (see a summary with '-h')