Types can be placed separately from the server side logic
Additional option to specify which module contains the generated types
Hi @deepmap-marcinr, could you please suggest who can check the PR? If it's good - I can work on the tests and other required improvements to make sure it will fit perfectly.
Hi @deepmap-marcinr could you please check this? Not sure if it's still actual though...
Rebased and adapted this patch in #558 . I think we can close it now.
Thank you @tuxofil , I've got no review, so I switched to in-place patching and almost forgot about this change - for sure when yours will be merged I will close this one.
Ok, now types could be separated the next way:
- For types package:
--- package: types output: types/types.gen.go generate: models: true - For the server package:
--- package: api output: api/server_v1.gen.go generate: echo-server: true additional-imports: - alias: . # means will be used without namespace prefix package: github.com/exampleorg/exampleproj/pkg/types # full path to the types package
So the types will be available to use in server generated code.