Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional JSON Schema features #47

Open
mikee47 opened this issue Sep 25, 2024 · 0 comments
Open

Additional JSON Schema features #47

mikee47 opened this issue Sep 25, 2024 · 0 comments

Comments

@mikee47
Copy link
Owner

mikee47 commented Sep 25, 2024

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?

@mikee47 mikee47 added the enhancement New feature or request label Sep 26, 2024
@mikee47 mikee47 removed the enhancement New feature or request label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant