Nice work on this gem, looks like what I need aside from a couple issues that needed tweaking. First was the inability to use namespaced resources:
rails g jsonapi:swagger Report did not work because my resource class is Api::V1::ReportResource
- Running
rails g jsonapi:swagger Api::V1::Report fails to call columns on NilClass because it's assuming the models are namespaced in the same module as the resource (ours are not). So the model_class_name in swagger_generator.rb:72 returns Api::V1::Report, which is incorrect. You can actually do this more easily by just calling Api::V1::ReportResource._model_class since that's already implemented.
- I also had issues with parameters not being passed to self.sortable_fields, creatable_fields, and updatable_fields, since those methods are normally passed a context parameter.
Nice work on this gem, looks like what I need aside from a couple issues that needed tweaking. First was the inability to use namespaced resources:
rails g jsonapi:swagger Reportdid not work because my resource class isApi::V1::ReportResourcerails g jsonapi:swagger Api::V1::Reportfails to callcolumnson NilClass because it's assuming the models are namespaced in the same module as the resource (ours are not). So the model_class_name in swagger_generator.rb:72 returnsApi::V1::Report, which is incorrect. You can actually do this more easily by just callingApi::V1::ReportResource._model_classsince that's already implemented.