Skip to content

Commit 13033ff

Browse files
committed
fix: Docs - Semantics around optionals
Signed-off-by: Mihai Galos <mihai@galos.one>
1 parent e3d692d commit 13033ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/user_docs/guides/schema-definition.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ The content of `app_module.k` is
6464
schema App:
6565
domainType: "Standard" | "Customized" | "Global"
6666
containerPort: int
67+
services?: [Service]
6768
volumes: [Volume]
68-
services: [Service]
6969

7070
check:
7171
1 <= containerPort <= 65535
@@ -89,8 +89,8 @@ In the above file, we use the `schema` keyword to define three models `App`, `Se
8989

9090
- The type of `domainType` is a string literal union type, similar to an "enumeration", which means that the value of `domainType` can only take one of `"Standard"`, `"Customized"` and `"Global"`.
9191
- The type of `containerPort` is an integer (`int`). In addition, we use the `check` keyword to define its value range from 1 to 65535.
92-
- The type of `services` is `Service` schema list type, and we use `?` to mark it as an optional attribute.
93-
- The type of `volumes` is a `Volume` schema list type, and we use `?` to mark it as an optional attribute.
92+
- The type of `services` is `Service` schema list type, and we use `?` to mark it as an optional attribute. Deleting it from `main.k` would still output a valid yaml.
93+
- The type of `volumes` is a `Volume` schema list type.
9494

9595
We can get the YAML output of the `app` instance by using the following command line
9696

0 commit comments

Comments
 (0)