loopbackio / loopbackio/loopback-next

Introduce getModelSchema and soft-deprecate getModelSchemaRef

Open
#5,791 0 comments 0 reactions 0 assignees View on GitHub
tech-debt
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with src/controller-spec.ts and the linked schema-consolidation context to understand the requested getModelSchema change. Then inspect the controller templates, /examples controllers, /docs files, and the tsdoc comment; done means those usages and documentation use getModelSchema, with the external shopping example also updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, cli, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.