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

support title #1486

Open
dejankatanic opened this issue Nov 30, 2022 · 4 comments · May be fixed by #2127
Open

support title #1486

dejankatanic opened this issue Nov 30, 2022 · 4 comments · May be fixed by #2127

Comments

@dejankatanic
Copy link

dejankatanic commented Nov 30, 2022

For example:

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "title": "Contact",  <------ title
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "type": "object"
}
@domoritz

This comment has been minimized.

@zachary-povey
Copy link

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 .

@domoritz
Copy link
Member

I see. Let's change this to a feature request and reopen.

@domoritz domoritz reopened this Jan 14, 2024
@domoritz domoritz changed the title Is there a way to add title to the JSON output support title Jan 14, 2024
@arthurfiorette
Copy link
Collaborator

Would you like to start a PR? I'm happy to review it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants