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

[Feature] Allow overriding the title field of a type #2957

Open
mstade opened this issue Feb 13, 2024 · 0 comments
Open

[Feature] Allow overriding the title field of a type #2957

mstade opened this issue Feb 13, 2024 · 0 comments

Comments

@mstade
Copy link

mstade commented Feb 13, 2024

Problem description

Currently you can use the docs field in a Fern type to set the description field in the generated OpenAPI spec, however there's no way to set the title field of the generated schema. Instead, it defaults to be the same as the type name.

Why would it be useful?

Being able to specify the title of a type adds another level of human readable documentation, in addition to the very useful docs field.

Describe the solution (optional)

I propose adding title as a field for any type, and that it follows the same semantics as the title field in the relevant JSON Schema spec, that is:

6.1. "title" and "description"
The value of both of these keywords MUST be a string.
Both of these keywords can be used to decorate a user interface with
information about the data produced by this user interface. A title
will preferrably be short, whereas a description will provide
explanation about the purpose of the instance described by this
schema.

Additional context

n/a

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

No branches or pull requests

1 participant