Skip to content

Commit

Permalink
Replace null with "null" in YAML examples
Browse files Browse the repository at this point in the history
YAML coerces `null` to a null literal (None in Python) rather than a string
literal ("null"). The examples should say `"null"` since all type attribues in
Recap have a string literal value.
  • Loading branch information
criccomini committed Aug 1, 2023
1 parent 0b3fa60 commit 14b167d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions specs/type/0.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ A value that can be one of several types. It is acceptable for a value to be mor
# A union type of null or a 32-bit signed int
type: union
types:
- type: null
- type: "null"
- type: int
bits: 32
```
Expand All @@ -292,7 +292,7 @@ All types support a `doc` attribute, which allows developers to document types.
type: union
doc: A union type of null or a 32-bit signed int
types:
- type: null
- type: "null"
- type: int
bits: 32
```
Expand Down Expand Up @@ -330,7 +330,7 @@ fields:
- name: secondary_phone
type: union
types: ["null", "string32"]
default: null
default: "null"
```

Unions can be cumbersome, so Recap supports a shorthand syntax for types using `optional`:
Expand Down

0 comments on commit 14b167d

Please sign in to comment.