loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

Introduce getModelSchema and soft-deprecate getModelSchemaRef

Open dhmlau opened this issue 5 years ago • 0 comments

Opening a follow up issue according to: https://github.com/strongloop/loopback-next/issues/4328#issuecomment-571638433

Cross posting @bajtos' comment from the above link:


After we land feat(rest): add openapi schema consolidation #4365, I'd like to start the process of deprecating getModelSchemaRef and reworking both our existing code and CLI templates to leverage the new schema consolidation:

  • Introduce getModelSchema similar to getModelSchemaRef (see src/controller-spec.ts)
  • Rework our controller templates to use getModelSchema instead of getModelSchemaRef
  • Rework controllers inside /examples to use getModelSchema
  • Soft-deprecate getModelSchemaRef in our documentation (both /docs files and the tsdoc comment)
  • Update https://github.com/strongloop/loopback4-example-shopping to use getModelSchema

cc @bajtos @jannyHou

dhmlau avatar Jun 20 '20 01:06 dhmlau