mean-expert-official / loopback-sdk-builder

Tool for auto-generating Software Development Kits (SDKs) for LoopBack
Other
399 stars 175 forks source link

Generating interfaces for "anonymous" types in a model #517

Open vladrmnv opened 7 years ago

vladrmnv commented 7 years ago

What type of issue are you creating?

Enhancement

Referencing https://loopback.io/doc/en/lb3/LoopBack-types.html#object-types, LoopBack allows for type definitions in model's "object" properties, but the sdk builder translates those into type "any" on model's typescript interface

I'm opening the issue as a suggestion for improvement and a discussion as to how to handle that

mrbatista commented 6 years ago

Same problem when define property as other model:

"property": {
  "user": {
    "type": "ModelNameA"
  }
}

SDK build property user as type any