LB4: How to disable schema validation?

24 views Asked by At

Am using LoopBack4 and, while every single service has it's own model for the input they need (and output they produce), some services need to accept any kind of input. From small stuff like IdClient being a number in both the model and database but needs to accept a number in string format, up to new parameters that are not present in the model.

The models in this situation are mostly use for documentation and guidance.

Once i manage to do it by debugging (i think) from the file sequence.ts and finding some other file by complete accident. Then i delete a specific function (and the times is being called) and it worked just fine.

Problem is, someone turn off my remote computer and, while i did save the changes, apparently GIT got confused and went back to the last commit. But no matter how much i try to replicate what i think i did to get there, i can't find the file.

The only thing i have left it's the name "validateValueAgainstSchema" in the "Search" tool. I tried to search the name through the project but there are no results. A part of me thinks that, since am working on a typescript project, the searching tool only looks in certain places and not others. Like it's ignoring the "DIST" folder or something.

I tried to google the name but i don't find anything related to it. And when i google how to disable this validation, the only things i find is either how models helps to validate the type of inputs/outputs you want or how to customize the kind of error message you will get if the input doesn't follow the model.

Thank you in advance.

0

There are 0 answers