-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Special tags are wrong compiled in the SDK #1149
Labels
bug
Something isn't working
Comments
I'll check it on Sunday. Thanks for bug reporting. |
Upgrade to It seems a little bit ugly, but this is the best way at right now. I could not make a separate file due to how the generic type for the custom validation type should work. export async function findTransactionsByUser(
connection: IConnection,
pubkey: string &
TagBase<{
target: "string";
kind: "regexPattern";
value: "/^[0-9a-fA-F]+$/";
validate: "RegExp(/^[0-9a-fA-F]+$/).test($input)";
exclusive: false;
schema: {};
}> &
TagBase<{
target: "string";
kind: "lengthDivisibleBy";
value: 2;
validate: "$input.length % 2 === 0";
exclusive: false;
}>,
): Promise<void> {
return PlainFetcher.fetch(connection, {
...findTransactionsByUser.METADATA,
template: findTransactionsByUser.METADATA.path,
path: findTransactionsByUser.path(pubkey),
});
} |
samchon
added a commit
that referenced
this issue
Dec 14, 2024
Fix #1149: clone mode with custom validator tag case.
Great. Thank you very much |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Bug Report
Summary
Description
I've got some Special tags using typia (7.2.0) but the generated sdk has wrong dependencies. Basically, even if I declare those tags in the same controller file, the file generated with
npx nestia sdk
contain a imports liketypia/lib/tags/LengthDivisibleBy
ortypia/lib/tags/RegexPattern
when those are actually created by myself in the controller file. The sdk generator should copy my special tags too.I've been reading your code and maybe the bug is here. Looks like you're always hardcoding the typia library path here
Code occuring the bug
Compiled sdk
Nestia SDK Config file
tsconfig.json
The text was updated successfully, but these errors were encountered: