OpenAPI.Schema
Edit on GitHubThe fields of a schema.
Here's Resend's Email schema:
objectstringThe type of object.
idstringThe ID of the email.
message_idstringThe Message-ID header value of the email.
tostring[]fromstringThe email address of the sender.
created_atstringThe date and time the email was created.
subjectstringThe subject line of the email.
htmlstringThe HTML body of the email.
textstringThe plain text body of the email.
bccstring[]The email addresses of the blind carbon copy recipients.
ccstring[]The email addresses of the carbon copy recipients.
reply_tostring[]The email addresses to which replies should be sent.
last_eventstringThe status of the email.
"bounced""canceled""clicked""complained""delivered""delivery_delayed""failed""opened""queued""scheduled""sent""suppressed"<OpenAPI.Schema schema={api.schemas.Email} name="Email" mode="response" />
Each field shows its name, type, whether it's required, its description and its limits. Fields that hold objects or lists of objects can be expanded. When a field can take several shapes (oneOf or anyOf), tabs switch between them. A schema that contains itself shows a note instead of repeating forever.
| Prop | What it does |
|---|---|
schema | The schema to show |
name | The name shown by OpenAPI.Schema.Title |
mode | "request" hides read-only fields. "response" hides write-only fields. |
To choose the parts:
<OpenAPI.Schema schema={schema} name="Email">
<OpenAPI.Schema.Title />
<OpenAPI.Schema.Description />
<OpenAPI.Schema.Properties mode="response" />
</OpenAPI.Schema>
The Schemas page of the API Reference lists every schema this way.