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

Update typia version for JSON schema to consider Date as string (@format date-time) type #401

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

samchon
Copy link
Owner

@samchon samchon commented Jun 16, 2023

When Date type comes, it would be converted to string type in JSON schema, by Date.toJSON(): string method.

By the way, the string type converted from Date type may form a date-time format, because Date.toJSON() returns same with value Date.toISOString(). Therefore, evolved JSON schema generator to consider such case. Also, in the same reason, typia does not block @format date or @format date-time tag on Date typed property.

…Format date-time)` type

When `Date` type comes, it would be converted to `string` type in JSON schema, by `Date.toJSON(): string` method.

By the way, the `string` type converted from `Date` type may form a `date-time` format, because `Date.toJSON()` returns same with value `Date.toISOString()`. Therefore, evolved JSON schema generator to consider such case. Also, in the same reason, `typia` does not block `@format date` or `@format date-time` tag on `Date` typed property.
@samchon samchon added the enhancement New feature or request label Jun 16, 2023
@samchon samchon self-assigned this Jun 16, 2023
@samchon samchon merged commit 7ff6950 into master Jun 16, 2023
@samchon samchon deleted the features/date branch June 18, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant