How to use the @loopback/repository-json-schema.getJsonSchemaRef function in @loopback/repository-json-schema

To help you get started, we’ve selected a few @loopback/repository-json-schema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strongloop / loopback-next / packages / openapi-v3 / src / controller-spec.ts View on Github external
export function getModelSchemaRef(
  modelCtor: Function & {prototype: T},
  options?: JsonSchemaOptions,
): SchemaRef {
  const jsonSchema = getJsonSchemaRef(modelCtor, options);
  return jsonToSchemaObject(jsonSchema) as SchemaRef;
}

@loopback/repository-json-schema

Converts TS classes into JSON Schemas using TypeScript's reflection API

MIT
Latest version published 11 days ago

Package Health Score

95 / 100
Full package analysis