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

swagger bug? "Date | null" #777

Closed
windofwind opened this issue Feb 2, 2024 · 1 comment
Closed

swagger bug? "Date | null" #777

windofwind opened this issue Feb 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@windofwind
Copy link
Sponsor Contributor

Bug Report

There is a bug with the type "Date" swagger notation.

i write this

export interface Data {
   /**
     * deleted date-time
     *
     * @type {Date | null}
     * @memberof Data
     */
    deleted_at: Date | null;
  }

But In swagger, nulls are not included.

thx 삼촌!

@windofwind windofwind changed the title swagger bug? swagger bug? "Date | null" Feb 2, 2024
@samchon samchon self-assigned this Feb 2, 2024
@samchon samchon added the bug Something isn't working label Feb 2, 2024
samchon added a commit to samchon/typia that referenced this issue Feb 2, 2024
Fix samchon/nestia#777 - JSON schema for `Date | null` type.
@windofwind
Copy link
Sponsor Contributor Author

TypedGuard Error

{
  "method": "typia.misc.assertClone",
  "path": "$input.data.created_at",
  "expected": "(Date | null)",
  "value": "2024-02-01T06:22:47+09:00"
}

this is error

export interface Data {
   /**
     * deleted date-time
     *
     * @type {Date | null}
     * @memberof Data
     */
    deleted_at: Date | null;
  }
export interface Data {
   /**
     * deleted date-time
     *
     * @type {Date | null}
     * @memberof Data
     */
    deleted_at: string | Date | null;
  }

is Success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants