# Validating convox.yml

**URL:** <https://community.convox.com/t/validating-convox-yml/447>\
**Category:** Configuration\
**Created:** [March 14, 2019, 4:53pm UTC](https://community.convox.com/t/validating-convox-yml/447 "2019-03-14T16:53:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sparky](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sparky](https://community.convox.com/u/sparky)\
**Post date:** [March 14, 2019, 4:53pm UTC](https://community.convox.com/t/validating-convox-yml/447/1 "2019-03-14T16:53:56Z")

</div>

Has anyone done work on linting/validating your `convox.yml`? Are there any tricks to do this with the CLI prior to running a `convox deploy` / workflow? I’d like to have this as a CI check and something to run locally when changing the configuration file.

I was just experimenting with [https://www.npmjs.com/package/pajv](https://www.npmjs.com/package/pajv), which converts JSON and uses [https://json-schema.org/](https://json-schema.org/) to validate the structure of the file. Here’s an example that does some _basic_ validation against the top level environment variables & timers:

```
{
  "definitions": {
    "timer": {
      "type": "object",
      "properties": {
        "command": {"type": "string"},
        "schedule": {"type": "string"},
        "service": {"type": "string"}
      },
      "required": ["command", "schedule", "service"],
      "additionalProperties": false
    }
  },
  "type": "object",
  "properties": {
    "environment": {
    "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "timers": {
      "type": "object",
      "uniqueItems": true,
      "patternProperties": {
        "^[a-z_]*$": {
          "$ref": "#/definitions/timer"
        }
      }
    }
  }
}
```
