
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
@loopback/model-api-builder
Advanced tools
Types and helpers for packages contributing Model API builders.
Types and helpers for packages contributing Model API builders.
The @loopback/model-api-builder
package provides a contract for extensions
that contribute builders for repositories and controllers. Users provide both
the model class and an extension. The extension is then used to build their
repository and controller based on the model class.
npm install --save @loopback/model-api-builder
An extension that contributes the repository and controller builders can be made
by implementing ModelApiBuilder
:
import {
asModelApiBuilder,
ModelApiBuilder,
ModelApiConfig,
} from '@loopback/model-api-builder';
@injectable(asModelApiBuilder)
export class SampleApiBuilder implements ModelApiBuilder {
readonly pattern: string = 'Sample';
build(
application: ApplicationWithRepositories,
modelClass: typeof Model & {prototype: Model},
config: ModelApiConfig,
): Promise<void> {
// define repository setup here
// ...
// define controller setup here
// ...
}
}
See all contributors.
MIT
FAQs
Types and helpers for packages contributing Model API builders.
The npm package @loopback/model-api-builder receives a total of 18,742 weekly downloads. As such, @loopback/model-api-builder popularity was classified as popular.
We found that @loopback/model-api-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.