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

Compiler error in cloned DTO when Example-tag is used. #1240

Closed
Zomono opened this issue Feb 20, 2025 · 2 comments
Closed

Compiler error in cloned DTO when Example-tag is used. #1240

Zomono opened this issue Feb 20, 2025 · 2 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@Zomono
Copy link

Zomono commented Feb 20, 2025

📝 Summary

  • Typia Version: "7.6.2-dev.20250205"
  • Expected behavior: Compiles without errors. Generic type from tags.Example should not be erased.
  • Actual behavior: DTO from structures directory does not compile.

I have a DTO interface on which I applied the tags.Example-tag. The example value is shown in the OpenAPI document as expected. But when I execute npx nestia sdk with clone-mode enabled, the generated structures directory contains the same DTOs with compiler errors. In detail, the generic type from the Example-tag is missing.

Code causing the bug

DTO:

interface MyDto {
    id: number & tags.Minimum<1> & tags.Example<999>;
}

Generated:

import type { Example } from "typia/lib/tags/Example";
import type { Minimum } from "typia/lib/tags/Minimum";
interface MyDto {
    id: number & Minimum<1> & Example;
}

=> Error message : "TS2314: Generic type Example requires 1 type argument(s)."

If you cannot reproduce the bug, please let me know.

@Zomono
Copy link
Author

Zomono commented Feb 20, 2025

I have just found this PR #1238
Does it already solve this bug?

@samchon
Copy link
Owner

samchon commented Feb 21, 2025

Use latest one, then be solved

@samchon samchon closed this as completed Feb 21, 2025
@samchon samchon self-assigned this Feb 21, 2025
@samchon samchon added the duplicate This issue or pull request already exists label Feb 21, 2025
@samchon samchon moved this to Done in Nestia v4 Update Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants