loopbackio / loopbackio/loopback-next
Introduce getModelSchema and soft-deprecate getModelSchemaRef
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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