UNPKG

@trusthab/composable-resources

Version:

migrating https://github.com/knetikmedia/hab-api/tree/integration/app/resources/composable

29 lines (24 loc) 533 B
const composer = require('../mixin_loader'); module.exports = (App) => { const { underscore } = require('inflected'); class NameableResource { static fields() { return { name: { weight: -999, type: 'text', or: ['null'], path: 'name', minLength: 1 }, description: { weight: -998, type: 'text', or: ['null'], path: 'description' } }; } } return composer(NameableResource, App); };