Skip to content

Additional JSON Schema features #47

@mikee47

Description

@mikee47

Some additional JSON schema keywords may be of use. I'll list these here for discussion.

uniqueItems

Can be specified for arrays. Essentially this converts a regular array into a set.

contains, minContains, maxContains

Extended validation. Would probably require callbacks to sort out.

title, description

Support documentation, clarify property usage, etc.
title could also be useful for defining unions without requiring a definition.
In fact, could that be a better way to define them?

deprecated

Code generator can include corresponding C++ decorations

readOnly, writeOnly

These suggest that accessor types are restricted.

Read-only properties would not have set or reset methods in updater.
This might imply const but that keyword has other uses in JSON Schema.

Write-only properties, when would these ever be needed?

$comment

For commenting schema. These could be added to generated code comments.
But why have both this and description?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions