skarmakar / rswag-helpers

Helper methods and custom matchers for rswag
MIT License
5 stars 1 forks source link

auto generation of schema content #1

Open francescor opened 11 months ago

francescor commented 11 months ago

I've just started using rswag and your helper makes a LOT of sense, thanks!

btw, is it really crazy to imagine that the following

rails g rswag:schema ResourceName

will fully populate spec/schemas/resource_name.rb with data coming from db/schema.rb and app/models/resource.rb (at least the basic, like list of attributes and type, but best would be validation) ?

santanukarmakar-g360 commented 10 months ago

Hey @francescor thanks for checking out.

is it really crazy to imagine that the following

well, I had this in mind, but did not really get into working on this. It is possible to do. ResourceName.columns can help in doing so. but, a bit of work :)