import { isString } from '@nestjs/common/utils/shared.utils' ; export function getSchemaPath ( model ) { const modelName = isString ( model ) ? model : model && model . name ; return `#/components/schemas/${ modelName }` ; } export function refs ( ... models ) { return models . map ( ( item ) => ( { $ref : getSchemaPath ( item . name ) } ) ) ; }