Open
Description
Background
As it stands, to opt out of using Get, you must do three things:
- Use
--module
mode - Update
paths.imports
to be an empty array - Provide your own
Request
shim
While we believe that using CreateAPI with Get it the quickest and easiest option, we understand that not everybody is in a position to adopt Get. As a result, we need to provide a better way to disable use of the dependency.
Description
I can think of three scenarios:
- You want to use Get and you are happy with the default behaviour
- Your networking client already defines it's own
Request
in a module that should be imported - You will build your networking client on top of the generated code and want a
Request
type generated for you
I did at first think that we should just generate Request
if you opted not to use Get, but this will put some people who already import a different module defining Request
in a situation where they can't use the generated code. It might be that like Get, the Request
type is used for manually crafted requests too so defining it inside the CreateAPI generated package might not be appropriate.
Not sure how best to handle this...