Skip to content

Items missing from Schema with array type #64

@theory

Description

@theory

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`|| &#10003; Yes|
|**age**|`number`|| &#10003; Yes|

Additional properties are allowed.

### thing.name

* **Type**: `string`
* **Required**:  &#10003; Yes

### thing.age

* **Type**: `number`
* **Required**:  &#10003; 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions