From 01355121de689f99bf8f0eec22cc1fa03961f27f Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 20 May 2024 18:52:04 +0200 Subject: [PATCH] chore(kb/yaml): add gotcha about key naming convention --- knowledge base/yaml.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/knowledge base/yaml.md b/knowledge base/yaml.md index 21efc63..b71ae76 100644 --- a/knowledge base/yaml.md +++ b/knowledge base/yaml.md @@ -1,12 +1,14 @@ # YAML -## Table of contents - 1. [TL;DR](#tldr) 1. [Further readings](#further-readings) ## TL;DR +There is no key naming convention.
+Best practice is to use the one used by the users or tools using that file (e.g.: Kubernetes --> camelCase, CircleCI --> +snake_case, Jenkins --> kebab-case). + ```yaml --- # This is a comment @@ -22,19 +24,23 @@ object: can: do lists: - too +"key:with:chars": requiring quotation ``` ## Further readings - [yaml-multiline.info] - [`yamllint`][yamllint] +- [What is the canonical YAML naming style] [yamllint]: yamllint.md +[what is the canonical yaml naming style]: https://stackoverflow.com/questions/22771226/what-is-the-canonical-yaml-naming-style [yaml-multiline.info]: https://yaml-multiline.info