It would be nice to have a json-schema converter like this: https://github.com/lightsofapollo/joi-to-json-schema
yes I was thinking about this as an additional feature for this library.
But I think most of people will use decorator based validation, because having schemas in separate files makes duplication (property names are duplicated both in the model and schema) + there is no refactoring benefits, and if your model's property name changed - you must manually change property name in the schema too.
But I think someone will still may need this feature, one of the use case that really works if user have an object without class, but still wants to perform schema-based validation.
I'll add accepting PRs label for now, until I return back to this library
I want it for swagger docs and json data generators that use json schema.
A great feature would be to be able to create a JSON-Schema object from a decorated class.
feel free to contribute 馃槂
@TomMarius @pleerock has anyone made any progress on this ?
I started a little library for JSON Schema conversion here. Any feedback would be appreciated!
Hi there, I was wondering if it would be possible to accept standard JSON Schema as input (much like AJV) in addition to the proposed schema definitions of this library?
Most helpful comment
A great feature would be to be able to create a JSON-Schema object from a decorated class.