deck file validate

Uses: deck
Related Documentation
Related Resources

The validate command reads the state file and ensures its validity. It reads all the specified state files and reports any YAML/JSON parsing issues.

deck file validate kong.yaml

Example response:

Error: 1 errors occurred:
	reading file kong.yaml: validating file content: 2 errors occurred:
	validation error: object={"paths":["/demo"]}, err=services.0.routes.0: Must validate at least one schema (anyOf)
	validation error: object={"paths":["/demo"]}, err=services.0.routes.0: name is required

deck file validate also checks for foreign relationships and alerts in cases of broken relationships or missing links. For example, you might see the following response:

Error: building state: route demo-route for plugin rate-limiting: entity not found

No communication takes places between decK and Kong during the execution of this command. This process is faster than online validation, but may catch fewer errors. For online validation, see deck gateway validate.

Command usage

Usage:
  deck file validate [flags] [kong-state-files...]

Flags:
  -h, --help                           help for validate
      --konnect-compatibility          validate that the state file(s) are ready to be deployed to Konnect
      --online-entities-list strings   indicate the list of entities that should be validated online validation.
      --parallelism int                Maximum number of concurrent requests to Kong. (default 10)
      --rbac-resources-only            indicate that the state file(s) contains RBAC resources only (Kong Enterprise only).
  -w, --workspace string               validate configuration of a specific workspace (Kong Enterprise only).
                                       This takes precedence over _workspace fields in state files.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!