raml-javascript-generator
raml-javascript-generator copied to clipboard
Unset "this._client" if no param-free context
In case the RAML file ONLY has URLs with URL parameters (i.e. "/foo/{foo}") the generator is only spitting out in constructor. {code} setprototypeof(client, this) {code} but NO specific mappings like {code} this.bazz = new Resource5(client, '/bazz') setprototypeof(client, this) {code}
However, this causes this._client to be never set as the "client" created here is never injected.
Workaround: Add setter in constructor: {code} this._client=client; setprototypeof(client, this) {code}