Skip to content
Latchkey

deck "schema violation" in plugin config in CI

decK validated a Kong plugin block against its schema and a field failed: an unknown key, a wrong type, or a missing required field. Kong returns a "schema violation" naming the plugin and field.

What this error means

deck gateway sync or validate fails with "schema violation (config.X: ...)" for a plugin such as rate-limiting, key-auth, or cors.

deck
Error: 1 schema violation (config.minute: expected an integer)
in plugin 'rate-limiting'

Common causes

A plugin field has the wrong type or name

A string was given where an integer is required, or a key was renamed across Kong versions, so the field is rejected.

A required plugin field is missing

The plugin schema requires a field (a key, a header, a limit) that the config does not set.

How to fix it

Correct the plugin field to match the schema

  1. Read which plugin and which config.* field the violation names.
  2. Check that plugin's schema for the expected type and required keys.
  3. Fix the value or add the missing field, then re-validate.
kong.yaml
plugins:
  - name: rate-limiting
    config:
      minute: 100
      policy: local

Pin the decK and Kong versions together

Plugin schemas change between Kong versions; pin both so a field valid locally stays valid in CI.

.github/workflows/ci.yml
- uses: kong/setup-deck@v1
  with:
    deck-version: '1.40.3'

How to prevent it

  • Validate plugin config in CI before any sync.
  • Track Kong version upgrades alongside plugin schema changes.
  • Avoid copying plugin blocks between Kong versions without re-validating.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →