UNPKG

@rest-api/react-models

Version:

[![npm version](https://img.shields.io/npm/v/@rest-api/react-models)](https://www.npmjs.com/package/@rest-api/react-models) [![codecov](https://codecov.io/gh/hector7/rest-api-react-models/branch/master/graph/badge.svg)](https://codecov.io/gh/hector7/rest-

12 lines (11 loc) 521 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const __1 = require("../../.."); const librarySchema = __1.Schema({ id: { type: Number, required: __1.required }, name: { type: String, required: __1.required }, }); exports.default = new __1.Model(librarySchema, 'id', '/api/library', __1.Schema({ count: { type: Number, required: __1.required }, results: [{ type: librarySchema, required: __1.required }] }), d => d.results, d => d.count, { trailingSlash: true });