(
modelCtor: typeof Entity & {prototype: T},
)
| 291 | } |
| 292 | |
| 293 | function getIdSchema<T extends Entity>( |
| 294 | modelCtor: typeof Entity & {prototype: T}, |
| 295 | ): SchemaObject { |
| 296 | const idProp = modelCtor.getIdProperties()[0]; |
| 297 | const modelSchema = jsonToSchemaObject( |
| 298 | getJsonSchema(modelCtor), |
| 299 | ) as SchemaObject; |
| 300 | return modelSchema.properties?.[idProp] as SchemaObject; |
| 301 | } |
| 302 | |
| 303 | // Temporary implementation of a short-hand version of `@requestBody` |
| 304 | // See https://github.com/loopbackio/loopback-next/issues/3493 |
no test coverage detected