Error with tyk lint and default tyk.conf


I’m running tyk gateway 2.4.2, it’s the standalone community edition.
I’m using the following environment variables to set it up

When I run tyk lint, this happened:

time=“Jan 11 09:43:30” level=warning msg=“No config file found, writing default to tyk.conf”
time=“Jan 11 09:43:30” level=info msg=“Loading default configuration…”
issues found in tyk.conf:
policies.policy_source: policies.policy_source must be one of the following: “”, “service”, “rpc”

The documentation says the following:

Configuring Community Edition to use a policy list

If your Tyk configuration is standalone and configuration is being managed via the REST API without the support of the dashboard, then you will need to set the policies section in your configuration file as follows:

    "policies": {
        "policy_source": "file",
        "policy_record_name": "./policies/policies.json"

Did I set something wrong? Should I open an issue in github?

Thank you for the work done so far and for your help.


It appears our linter is a bit strict at the moment, you can quickly fix this yourself for now. If you go to Tyk/lint/schema.go and modify
"policy_source": { "type": "string", "enum": ["", "service", "rpc", "file"] }

And then recompile the gateway it should be fixed, I’ll fix this on our master in the meantime.


1 Like

Thank you for the quick and concise answer.