John McGehee John McGehee - 1 year ago 213
YAML Question

What is the canonical YAML naming style

I am designing a new YAML file, and I want to use the most standard style of naming. Which is it?


- job-name:


- job_name:

CamelCase? (probably not)

- jobName:

Answer Source

Use the standard dictated by the surrounding software.

For example, in my current project the YAML file contains default values for Python attributes. Since the names used in YAML appear in the associated Python API, it is clear that on this particular project, the YAML names should obey the Python lower_case_with_underscores naming convention.

My next project might have a different prevailing naming convention, in which case I will use that.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download