ts-json-schema-generator
ts-json-schema-generator copied to clipboard
support `title`
For example:
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Contact", <------ title
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
Please ask your questions on stack overflow. We reserve the issue tracker for bugs and feature requests.
Regarding your specific question, check the supported formats. We only support what's supported in JSON schema.
Please ask your questions on stack overflow. We reserve the issue tracker for bugs and feature requests.
Regarding your specific question, check the supported formats. We only support what's supported in JSON schema.
Not sure what you were getting at here, titles are a supported feature of JSON schemas, see the meta-schema: https://json-schema.org/draft/2020-12/json-schema-core.
It would be useful if there was a way for them to be generated in the output schema without writing a custom formatter, i.e.
a cli option such as --use-type-names-as-titles. I don't see why adding this as a cli option would be fundamentally different to options such as --no-top-ref .
I see. Let's change this to a feature request and reopen.