Allow API to reside at submodule of crate#642
Conversation
222df41 to
517a062
Compare
517a062 to
be990a6
Compare
|
Is this fixing a bug or is this adding some new functionality? I'm not sure I understand the utility. |
|
This is new functionality, needed in order to have the generated cli & httpmock be a module that resides beside the generated client. Currently the generator uses It is needed for #638 , where the types+client, mocks and cli are three separate generated modules, and lib.rs is a manually authored file that combines those generated files and potentially adds other human authored functionality. The top level lib.rs does not contain the types+client. Therefore the mocks and cli need to be told where to find the types+client within the crate. @franklin-ai is using this approach to be able to greater control over our crate lib.rs, re-exporting at the top level only a subset of the generated mods, and including lots of other human written code, such as impls on the generated types. |
be990a6 to
b809a36
Compare
|
ping @ahl . there are a bunch of other improvements which depend on this, some with a PR, others waiting on it getting merged. |
|
good enough; thanks |
Split off from #638
Potentially
crate_nameargs should be renamed.