-
Notifications
You must be signed in to change notification settings - Fork 53
Items missing from Schema with array type #64
Copy link
Copy link
Open
Description
I have a JSON schema named things.schema.json that looks like this:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "things.schema.json",
"title": "Things",
"description": "A list of things.",
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": { "$ref": "thing.schema.json" }
}It references thing.schema.json, which looks like this:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "thing.schema.json",
"title": "Thing",
"description": "A thing.",
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "number" }
},
"required": ["name", "age"]
}Then I run wetzel like so:
wetzel.js --autoLink=cqo things.schema.json > things.md
The resulting file looks like this:
# Objects
* [`Thing`](#reference-thing)
* [`Things`](#reference-things) (root object)
---------------------------------------
<a name="reference-thing"></a>
## Thing
A thing.
**`Thing` Properties**
| |Type|Description|Required|
|---|---|---|---|
|**name**|`string`|| ✓ Yes|
|**age**|`number`|| ✓ Yes|
Additional properties are allowed.
### thing.name
* **Type**: `string`
* **Required**: ✓ Yes
### thing.age
* **Type**: `number`
* **Required**: ✓ Yes
---------------------------------------
<a name="reference-things"></a>
## Things
A list of things.
Note that the Things reference at the bottom is missing any information about the items. The same is true even if I set "items": { "type": "string" }; the resulting Markdown is simply:
# Objects
* [`Things`](#reference-things) (root object)
---------------------------------------
<a name="reference-things"></a>
## Things
A list of things.
If I add minItems uniqueItems, or any of the rest, none of it appears, either. Shouldn't there be more details on what constitutes an an array schema?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels