craftr schema import

Import an OpenAPI spec: preview the diff, resolve conflicts, write, and remap. Source may be a file path or URL; omit to use the saved source or piped stdin.

Usage

craftr schema import [source] [--api <api>] [--yes] [--no-persist-source] [--no-auto-clear-caught-up]

Flags

FlagDescription
--api-aAPI slug.
--yes-ySkip the apply confirmation (required for non-interactive use).
--no-persist-sourceDo not persist the spec source in api.json when a path or URL is given. Ignored for stdin and for a saved source.
--no-auto-clear-caught-upKeep overrides whose value already matches the new source.

Examples

craftr schema import ./openapi.json -a petstore-api
craftr schema import https://petstore3.swagger.io/api/v3/openapi.json -a petstore-api --yes

See also