Skip to content

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

@danielo515

Description

@danielo515

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions