konform-kt / konform

Portable validations for Kotlin
https://www.konform.io
MIT License
652 stars 39 forks source link

Add support for Swagger/OpenAPI #6

Closed raderio closed 4 months ago

raderio commented 5 years ago

https://swagger.io/specification/#schema-object

Swagger/OpenAPI schema contains class/object definition and validation rules. It will be great if this library will provide this information in order to be able to integrate it for full schema generation from code.

For example Spring or Micronaut can generate endpoints schema and integrate class definitions from this library.

nlochschmidt commented 5 years ago

Thanks, that is an interesting idea. I am wondering how to deal with validations that are not supported by Swagger though. They should probably just be ignored, right?

raderio commented 5 years ago

They should probably just be ignored, right?

Yes.

dhoepelman commented 4 months ago

See e.g. #27 and #99. While this is a great feature in theory, it's quite a bit of work and likely breaking changes, so not considering this in scope for now.