mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
chore(kb/yaml): add gotcha about key naming convention
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
# YAML
|
# YAML
|
||||||
|
|
||||||
## Table of contents <!-- omit in toc -->
|
|
||||||
|
|
||||||
1. [TL;DR](#tldr)
|
1. [TL;DR](#tldr)
|
||||||
1. [Further readings](#further-readings)
|
1. [Further readings](#further-readings)
|
||||||
|
|
||||||
## TL;DR
|
## TL;DR
|
||||||
|
|
||||||
|
There is no key naming convention.<br/>
|
||||||
|
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
|
```yaml
|
||||||
---
|
---
|
||||||
# This is a comment
|
# This is a comment
|
||||||
@@ -22,19 +24,23 @@ object:
|
|||||||
can: do
|
can: do
|
||||||
lists:
|
lists:
|
||||||
- too
|
- too
|
||||||
|
"key:with:chars": requiring quotation
|
||||||
```
|
```
|
||||||
|
|
||||||
## Further readings
|
## Further readings
|
||||||
|
|
||||||
- [yaml-multiline.info]
|
- [yaml-multiline.info]
|
||||||
- [`yamllint`][yamllint]
|
- [`yamllint`][yamllint]
|
||||||
|
- [What is the canonical YAML naming style]
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
References
|
Reference
|
||||||
|
═╬═Time══
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Knowledge base -->
|
<!-- Knowledge base -->
|
||||||
[yamllint]: yamllint.md
|
[yamllint]: yamllint.md
|
||||||
|
|
||||||
<!-- Others -->
|
<!-- Others -->
|
||||||
|
[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
|
[yaml-multiline.info]: https://yaml-multiline.info
|
||||||
|
|||||||
Reference in New Issue
Block a user