In the current behaviour the BarEdit model class seems to extends from the BarBase class and it has got the name property, but the id and delete property in the BarEdit model class itself disappeared. I expected the id and delete properties to be there as well, but it's not.
Also when the model class BarResult (which extends from BarEdit) is used in a controller's getModelSchemaRef it has got all the properties from all 3 model classes:
A work around to this problem I've found is to create a copy of the BarBase model class and call it something for example BarBaseT and have BarEdit extends from that one instead.
Operating System Information
darwin x64 14.15.4
├── @loopback/boot@3.4.0
├── @loopback/core@2.16.0
├── @loopback/repository@3.6.0
├── @loopback/rest-explorer@3.3.0
├── @loopback/rest@9.3.0
├── @loopback/service-proxy@3.2.0
├── loopback-connector-kv-redis@3.0.3
├── loopback-connector-postgresql@5.3.0
├── loopback-connector-rest@3.7.0
npm notice
npm notice New minor version of npm available! 7.6.1 -> 7.16.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.16.0
npm notice Run npm install -g npm@7.16.0 to update!
npm notice
Steps to reproduce
I've got a controller with an endpoint which take a request body of the
Foo
model class.The model classes:
Current Behaviour
When looking at the generated swagger document or calling the controller endpoint, the schema body is the following:
The
id
anddelete
properties are missing.Expected Behaviour
I expected that the controller model schema of
Foo
would be:In the current behaviour the
BarEdit
model class seems to extends from theBarBase
class and it has got thename
property, but theid
anddelete
property in theBarEdit
model class itself disappeared. I expected theid
anddelete
properties to be there as well, but it's not.Also when the model class
BarResult
(which extends fromBarEdit
) is used in a controller'sgetModelSchemaRef
it has got all the properties from all 3 model classes:Additional information
A work around to this problem I've found is to create a copy of the
BarBase
model class and call it something for exampleBarBaseT
and haveBarEdit
extends from that one instead.Operating System Information