repogen
repogen copied to clipboard
Detect model automatically based on model data in interface
Just found this great generator but missing one thing to use it in our project with data model generated by other tool (OpenAPI spec generator)
Is your feature request related to a problem? Please describe.
I'm using model from pkg auto-generated from OpenAPI spec so would not want to copy it everytime into file where interface is.
Describe the solution you'd like
Ignore -model
flag, just detect it in from the interface methods definitions (copy the same?) during generation.
Did you mean just allowing model struct and repository interface to be located in the different file in the same package? Or different packages?
From the solution about auto-detecting -model
flag as you mentioned, I think it is an interesting feature, but I still cannot see how it will be necessary since you must already know the name of the model prior to writing the repository interface.