You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// example/basic_post.tldr
base <https://example.com/>;
use <https://schema.org/> as schema;
layout BasicPost for schema:BlogPosting {
/// Title of the post.
schema:title: schema:Text,
/// Content of the post.
schema:body: schema:Text
}
For now it generates the fololwing JSON Schema:
{
"$id": "https://example.com/BasicPost",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"body": {
"description": "Content of the post.",
"$ref": "https://schema.org/Text"
},
"title": {
"description": "Title of the post.",
"$ref": "https://schema.org/Text"
}
},
"title": "Basic Blog Post.",
"type": "object"
}
However it would be preferable to replace "$ref": "https://schema.org/Text" by "type": "string" directly, by following the datatype alias.
The text was updated successfully, but these errors were encountered:
Consider the following layout:
For now it generates the fololwing JSON Schema:
However it would be preferable to replace
"$ref": "https://schema.org/Text"
by"type": "string"
directly, by following the datatype alias.The text was updated successfully, but these errors were encountered: