Adis Durakovic
Adis Durakovic
May Allah bless you and give you the strength and patience ๐
maybe the validatior has some method that returns a nicer object that can be easily parsed, in combination with dynamic imports using `eval()`. thinking of smth like this - read...
@HasanAshab My example was just pseudo-code ๐ , but yeah something along these lines looks good.
I'm not familiar with vinejs, but what do you get if you try to validate purposely wrong data? do you get any useful structure? ```ts validator.validate(null) ```
> by trying with all data types one by one. I think this might be too dirty and spaghetti. Is there a cleaner solution? Does the validator provide any other...
Yeah... I've been looking into it for the past few hours, and there's really no way to get to the schema itself. I think the only way is to parse...
You're right. I guess we might ditch this one after all, since it's technically impossible. Or, as a final resort, I could ask the folks at adonisJS, whether they could...
https://github.com/adonisjs/core/discussions/4480 Fingers crossed! ๐ค๐ป
@HasanAshab Nice, now that we get a `toJSON()`, I'd suggest the following implementation. ```ts // autoswagger.ts // ----------------------------- private async getSchemas() { let schemas = { Any: { description: "Any...
Oh, one more thing. Do you think it would be easy enough to get the errors of the validator as a response body? Example (pseudo-code) ```ts /** * @create *...