
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@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,206 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.