From 14b167dedddc98988663e8436a5216ae48ab4c9e Mon Sep 17 00:00:00 2001 From: Chris Riccomini Date: Mon, 31 Jul 2023 20:04:50 -0700 Subject: [PATCH] Replace `null` with `"null"` in YAML examples 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. --- specs/type/0.2.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/type/0.2.0.md b/specs/type/0.2.0.md index 5d627dd..3c21632 100644 --- a/specs/type/0.2.0.md +++ b/specs/type/0.2.0.md @@ -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 ``` @@ -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 ``` @@ -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`: