Skip to content

Commit

Permalink
docs: changes Model.md to reflect known issue
Browse files Browse the repository at this point in the history
Changes Model.md to reflect a known issue with property reflection when dealing with type aliases and extracted types. See loopbackio#3863. No code changes.
  • Loading branch information
taicho committed Oct 4, 2019
1 parent 97ba789 commit 88c3533
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/site/Model.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ The property decorator leverages LoopBack's
[metadata package](https://github.com/strongloop/loopback-next/tree/master/packages/metadata)
to determine the type of a particular property.

{% include note.html content="
Currently, property types must be specified explicitly either on the property itself or via the `type` option of the property decorator. Aliased types or types that extracted from a class or interface (e.g. `public name: OtherClass['otherProperty']`) will not work properly and will result in the property type being resolved as an empty object rather than the intended type in the generated OpenAPI specifcation. This is due to a limitation and flaw in the way TypeScript currently generates the metadata that is used to generate the OpenAPI specification for the application. (see [Issue #3863](https://github.com/strongloop/loopback-next/issues/3863))
" %}

```ts
@model()
class Product extends Entity {
Expand Down

0 comments on commit 88c3533

Please sign in to comment.