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

Optional values with default should not appear as nullable in the GET methods of API docs #657

Open
danielo515 opened this issue Aug 11, 2024 · 0 comments

Comments

@danielo515
Copy link

Hello again, and thanks for all your help so far.

I have little thing to propose, nothing very important. I think that in the GET docs the fields that have a default value should be flagged as nullable.

For example:

export const ExternalExpense = Schema.Struct({
  amount: Schema.Number,
  currency: Schema.String.pipe(
    Schema.optionalWith({ default: () => "EUR", nullable: true })
  ),
  date: Schema.Union(Schema.DateFromNumber, Schema.Date),
});

Here you can see that currency has a default value, so it will never be null, however in the docs it appears like this:

Screenshot 2024-08-11 at 13 35 34
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