Skip to content

Commit

Permalink
feat(docs): update docs (#597)
Browse files Browse the repository at this point in the history
feat(docs): update docs

Updates the Wing docs. See details in [workflow run].

[Workflow Run]: https://github.com/winglang/docsite/actions/runs/6123673996

------

*Automatically created via the "update-docs" workflow*
  • Loading branch information
monadabot authored Sep 8, 2023
1 parent cdc2487 commit 4e41e28
Showing 1 changed file with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,64 @@ to get values from.



### JsonSchema <a name="JsonSchema" id="@winglang/sdk.std.JsonSchema"></a>

Struct Schema.

#### Initializers <a name="Initializers" id="@winglang/sdk.std.JsonSchema.Initializer"></a>

```wing
new JsonSchema(schema: Json);
```

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@winglang/sdk.std.JsonSchema.Initializer.parameter.schema">schema</a></code> | <code><a href="#@winglang/sdk.std.Json">Json</a></code> | *No description.* |

---

##### `schema`<sup>Required</sup> <a name="schema" id="@winglang/sdk.std.JsonSchema.Initializer.parameter.schema"></a>

- *Type:* <a href="#@winglang/sdk.std.Json">Json</a>

---

#### Methods <a name="Methods" id="Methods"></a>

| **Name** | **Description** |
| --- | --- |
| <code><a href="#@winglang/sdk.std.JsonSchema.asStr">asStr</a></code> | Retrieve the json schema as a string. |
| <code><a href="#@winglang/sdk.std.JsonSchema.validate">validate</a></code> | Attempt to validate a json object against the schema. |

---

##### `asStr` <a name="asStr" id="@winglang/sdk.std.JsonSchema.asStr"></a>

```wing
asStr(): str
```

Retrieve the json schema as a string.

##### `validate` <a name="validate" id="@winglang/sdk.std.JsonSchema.validate"></a>

```wing
validate(obj: Json): void
```

Attempt to validate a json object against the schema.

###### `obj`<sup>Required</sup> <a name="obj" id="@winglang/sdk.std.JsonSchema.validate.parameter.obj"></a>

- *Type:* <a href="#@winglang/sdk.std.Json">Json</a>

the Json object to validate.

---




### Map <a name="Map" id="@winglang/sdk.std.Map"></a>

Immutable Map.
Expand Down Expand Up @@ -2645,6 +2703,7 @@ Shared behavior for all structs.
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@winglang/sdk.std.Struct.fromJson">fromJson</a></code> | Converts a Json to a Struct. |
| <code><a href="#@winglang/sdk.std.Struct.schema">schema</a></code> | Retrieve the schema for this struct. |
| <code><a href="#@winglang/sdk.std.Struct.tryFromJson">tryFromJson</a></code> | Converts a Json to a Struct, returning nil if the Json is not valid. |

---
Expand All @@ -2663,6 +2722,14 @@ Converts a Json to a Struct.

---

##### `schema` <a name="schema" id="@winglang/sdk.std.Struct.schema"></a>

```wing
Struct.schema();
```

Retrieve the schema for this struct.

##### `tryFromJson` <a name="tryFromJson" id="@winglang/sdk.std.Struct.tryFromJson"></a>

```wing
Expand Down

1 comment on commit 4e41e28

@vercel
Copy link

@vercel vercel bot commented on 4e41e28 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.