springfox / springfox-grails-integration

SpringFox integration with Grails 3.x
Apache License 2.0
19 stars 12 forks source link

Model substitution #25

Open javierggi opened 6 years ago

javierggi commented 6 years ago

Hi, I am in need of substituting some Models in the following way. Lets say I have a domain class as follows:

package My.Domains

class Company {
    String name
    String address
    String firstAdditional
    String secondsAdditional
    String thirdAdditional
}

And a Model class as follows:

package My.Models

class Company {
    String name
    String address
}

I want Swagger to use the my model class as a template of what I need to send in a POST request. I tried using the following: directModelSubstitute(My.Domains.Company, My.Models.Company) but it does not work. Am i misunderstanding how this works or is there any other way to achieve this?

Also, is there a way to do something similar using a third class (model) for the responses?

dilipkrish commented 6 years ago

What are u using in your operation?