Repository navigation
Describe model schema in generated $resource - #223
Conversation
| * @description | ||
| * The schema of the model represented by this $resource | ||
| */ | ||
| R.schema = <%- JSON.stringify(meta.modelSchema, null, 2) -%>; |
There was a problem hiding this comment.
would it be better to use <%-: meta.modelSchema | q %>?
There was a problem hiding this comment.
good catch, will apply your proposal.
There was a problem hiding this comment.
Actually, on the second thought, I think it's better to explicitly call JSON.stringify here. The intention of the q filter is to produce a quoted string. The fact that it calls JSON.stringify under the hood is an implementation detail that we should not rely on, as it may change in the future (in theory).
|
Please note that this should be landed with strongloop/loopback-sdk-angular-cli#34 using options since angular-sdk-cli isnt using loopback-sdk-angular/lib/services.js Line 45 in 61b3641 https://github.com/akera-io/loopback-sdk-angular-cli/blob/a5979f765710e4b96b46922d61da1f0c716fcbad/bin/lb-ng#L33 placeholder for link to documentation once landed |
|
@bajtos other than comments above LGTM |
I was careful to preserve support for old API loopback-sdk-angular/lib/services.js Lines 46 to 52 in 61b3641 |
|
right, all the tests are passing too
|
generateServices(app, options)to tame overgrowing number of arguments.This patch supersedes #194.
/to @davidcheung please review
/cc @akera-io