Skip to content

Commit

Permalink
fix array examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Aug 8, 2024
1 parent 85e820d commit ffb95c4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions semantic-conventions/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,20 +272,14 @@ examples:
A single example value for an array of strings attribute:
```yaml
examples: ['first element of first array', 'second element of first array']
examples: [ ['first element of first array', 'second element of first array'] ]
```
or
```yaml
examples:
- ['first element of first array', 'second element of first array']
```
Attention, the following will throw a type mismatch error because an array of strings as type for the example values is expected and not a string:
```yaml
examples: 'this is an error'
- ['first element of first array', 'second element of first array']
```
Multiple example values for an array of string attribute:
Expand All @@ -302,6 +296,12 @@ examples:
- ['first element of second array', 'second element of second array']
```
Attention: the following will throw a type mismatch error because an array of strings as type for the example values is expected and not a string:
```yaml
examples: 'this is an error'
```
#### Ref
`ref` MUST have an id of an existing attribute. When it is set, `id`, `type`, `stability`, and `deprecation` MUST NOT be present.
Expand Down

0 comments on commit ffb95c4

Please sign in to comment.