Questions tagged [yaml]

Use this tag for questions about the YAML data serialization format only, not for questions about programs (or examples) that happen to have their configuration in a YAML format. Questions about the CSS framework also called YAML should be tagged [yaml-css] instead.

From the Wikipedia article about YAML:

YAML (/ˈjæməl/, rhymes with camel) is a human-readable data serialization language that takes concepts from programming languages such as C, Perl, and Python, and ideas from XML and the data format of electronic mail (RFC 2822). YAML was first proposed by Clark Evans in 2001, who designed it together with Ingy döt Net and Oren Ben-Kiki. It is available for several programming languages.

YAML is a recursive acronym for "YAML Ain't Markup Language". Early in its development, YAML was said to mean "Yet Another Markup Language", but it was then reinterpreted (backronyming the original acronym) to distinguish its purpose as data-oriented, rather than document markup.

Features:

  • Its familiar indented outline and lean appearance make it especially suited for tasks where humans are likely to view or edit data structures, such as configuration files, dumping during debugging, and document headers.
  • Although well-suited for hierarchical data representation, it also has a compact syntax for relational data as well.
  • A major part of its accessibility comes from eschewing the use of enclosures like quotation marks, brackets, braces, and open/close-tags, which can be hard for the human eye to balance in nested hierarchies.

See also

Related tags

15259 questions
5
votes
1 answer

How do I write a yaml file from a dictionary with python?

I have a csv file which containing data where the header contains keys and the cells contain values. I would like to use python to create a yaml file from the contents of the csv file. I created a dictionary of the K:V pairs; however, I am stuck…
ShortCircuit
  • 53
  • 1
  • 4
5
votes
1 answer

Configuring Maven with YAML - maven-enforcer-plugin to be specific - not working

My Maven POM is YAML (thanks to io.takari.polyglot) and I am having a hard time writing the config in YAML because the example has values, but I believe I should configure the maven-enforcer-plugin's banTransitiveDependencies rule to take no…
Adam
  • 5,215
  • 5
  • 51
  • 90
5
votes
1 answer

interface{} to []string

I'm trying to parse some YAML file into go struct, but the file itself can not be treated as ordinary go structure: some of values may be either string or map[string][]string. What I have tried is to do custom unmarshal func: func (domain *Domain)…
Alex Mokeev
  • 304
  • 3
  • 17
5
votes
2 answers

How can I use an environment variable in a key inside of yaml file

I have the following .env file: # ENV ENVIRONMENT=local SITENAME=reo I have the following docker-compose.yml (part of it) file: volumes: ${SITENAME}-sync: external: true I get the following error: volumes value '${SITENAME}-sync' does not…
albertski
  • 2,428
  • 1
  • 25
  • 44
5
votes
1 answer

Swagger 3.0 schema error "should NOT have additional properties"

What does this error below mean? (Running in Swagger Editor) Schema error should NOT have additional properties additionalProperty: /buildinfo, /clearcache, /countries/{countryId}/cinemas/{theatreid}/screens/{screenid}/layout, …
peter ivarsson
  • 51
  • 1
  • 1
  • 3
5
votes
1 answer

Mixing static and dynamic endpoints in app.yaml file

I'm trying to describe endpoints in my App Engine app and am having difficulty for directory structures that mix static and dynamic content. But my yaml rules are conflicting with one another. Before I change my directory structure, does anyone have…
Greg
  • 2,559
  • 4
  • 28
  • 46
5
votes
1 answer

docker extension fields Parser Error

I just saw the new extension fields in Docker Compose v3.4 and tried to use it in combination with partially override. My compose files looks like this: version: '3.4' x-environment: &default-environment - FOO=foo - BAR=bar services: …
Munchkin
  • 4,528
  • 7
  • 45
  • 93
5
votes
1 answer

PyYAML find line of incorrect YAML syntax error

I'm reading in a YAML file. If there's a syntax mistake that causes an exception, I send the exception to a logger. What is a way to identify in my logging message which line of the YAML file contains the syntax error? try: with open(input_path,…
forest
  • 315
  • 4
  • 14
5
votes
1 answer

How to create a multilevel dictionary in the YAML metadata of R Markdown?

While using a single level list/dictionary for parameterizing an rmarkdown document works: --- params: first_level: ~ --- ```{r} params ``` and knitting returns the expected ## $first_level ## NULL I'm unable to use multi-level…
balin
  • 1,554
  • 1
  • 12
  • 26
5
votes
1 answer

Include an extra section of text/hyperlink in YAML-Header section of Rmarkdown document

I'm writing a document in RMarkdown and have hopefully a fairly straightforward query about including extra information in the header section. My Header section of the rmd looks like: --- title: "My R-Markdown Document" author: "[My name here](a…
mmarks
  • 1,119
  • 7
  • 14
5
votes
1 answer

How to define enum values in array or enum as key in map property?

I am using swagger-codegen-maven-plugin (2.2.1) to generate java and typescript code class files from YML configuration. I have two questions. How to define array of enum property in YML? How to define map property enum as key and boolean as value…
nayakam
  • 4,149
  • 7
  • 42
  • 62
5
votes
1 answer

Gitlab-ci: how to run python script with cl arguments

I want to run a python script, which expects cl arguments, before the actual build, so I added the following piece in .gitlab-ci.yml: .deploy_template: &template_name variables: - arg1: "https://some/url/" - arg2: "https://another/url/" -…
user1329187
5
votes
2 answers

How to break a string over multiple lines and preserve spaces in YAML?

Please note, that the question is similar like this one, but still different so that those answers won't solve my problem: For insertion of control characters like e.g. \x08, it seems that I have to use double quotes ". All spaces needs to be…
Joe
  • 3,090
  • 6
  • 37
  • 55
5
votes
0 answers

Custom Field in Rmarkdown Header

I am attempting to make a template for a html rmarkdown document to be used by my team at work. The Word document I'm hoping to replace has a header with a set of fields which are required for our data management process. The image below shows both…
Richard Haydock
  • 111
  • 1
  • 5
5
votes
2 answers

cf manifest path regex issue

I'm trying to use a regexp for path variable in cloudfoundry manifest however I couldn't find a way around. This is a Spring Boot application with JAR build. suppose I have the path as below: name: MyApp path: build/libs/MyApp*.jar It doesn't seem…
neocorp
  • 569
  • 7
  • 20
1 2 3
99
100