Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $schema to ecs.json and .circleci/config.yml #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

entropitor
Copy link

Having a $schema in json files has a bunch of benefits, mostly because of language servers (json-languages-server and yaml-language-server). These are automatically setup in VSCode and easy to set up for other editors.

  1. You get auto-completion through your LSP. This way, you don't make typo's and you don't have to type as much.
  2. You get documentation about some properties through your LSP in your editor. Just hover over a field.
  3. You get lint errors in your editor if you add a field that doesn't exist (and additionalProperties are forbidden) or if you have the type wrong
  4. In the future, we might enforce the schema of ecs.json files through a CircleCI job

Result of linting ecs.json files for this repo:


Note that healtCheck is now a required property, if you have a containerPort defined. See https://datacamp.atlassian.net/wiki/spaces/PRODENG/pages/25690481/ecs.json+reference for more info.
Note that you might have a literal "${VARIABLE}" in you ecs.json that still gets replaced at build time to create a valid ecs.jon which might complain in your editor but is not shown above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant