{"action":"opened","issue":{"url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/41","repository_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus","labels_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/41/comments","events_url":"https://api.github.com/repos/feathers-plus/generator-feathers-plus/issues/41/events","html_url":"https://github.com/feathers-plus/generator-feathers-plus/issues/41","id":360548226,"node_id":"MDU6SXNzdWUzNjA1NDgyMjY=","number":41,"title":"Unable to regenerate validate and mongoose schemas","user":{"login":"abhisekp","id":1029200,"node_id":"MDQ6VXNlcjEwMjkyMDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1029200?v=4","gravatar_id":"","url":"https://api.github.com/users/abhisekp","html_url":"https://github.com/abhisekp","followers_url":"https://api.github.com/users/abhisekp/followers","following_url":"https://api.github.com/users/abhisekp/following{/other_user}","gists_url":"https://api.github.com/users/abhisekp/gists{/gist_id}","starred_url":"https://api.github.com/users/abhisekp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhisekp/subscriptions","organizations_url":"https://api.github.com/users/abhisekp/orgs","repos_url":"https://api.github.com/users/abhisekp/repos","events_url":"https://api.github.com/users/abhisekp/events{/privacy}","received_events_url":"https://api.github.com/users/abhisekp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-15T15:11:10Z","updated_at":"2018-09-15T15:11:10Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nThe regenerate using `feathers-plus g service` and then `users` service should regenerate the `mongoose` and `validate` schemas after editing the `schema` file.\r\n\r\n**Schema File**\r\n```json\r\n// Define the Feathers schema for service `users`. (Can be re-generated.)\r\n// !code: imports // !end\r\n// !code: init // !end\r\n\r\n// Define the model using JSON-schema\r\nlet schema = {\r\n  // !<DEFAULT> code: schema_header\r\n  title: 'Users',\r\n  description: 'Users database.',\r\n  // !end\r\n  // !code: schema_definitions // !end\r\n\r\n  // Required fields.\r\n  required: [\r\n    // !code: schema_required\r\n    'username',\r\n    // !end\r\n  ],\r\n  // Fields with unique values.\r\n  uniqueItemProperties: [\r\n    // !code: schema_unique\r\n    'username',\r\n    // !end\r\n  ],\r\n\r\n  // Fields in the model.\r\n  properties: {\r\n    // !code: schema_properties\r\n    id: { type: 'ID' },\r\n    name: {\r\n      type: 'object',\r\n      properties: {\r\n        firstName: {\r\n          type: 'string',\r\n          minLength: 2,\r\n          maxLength: 15,\r\n          faker: 'name.firstName',\r\n        },\r\n        lastName: {\r\n          type: 'string',\r\n          minLength: 2,\r\n          maxLength: 15,\r\n          faker: 'name.lastName',\r\n        },\r\n      },\r\n    },\r\n    username: { type: 'string', faker: 'internet.userName' },\r\n    password: { type: 'string', chance: { hash: { length: 60 } } },\r\n    email: {\r\n      type: 'string',\r\n      minLength: 8,\r\n      maxLength: 40,\r\n      faker: 'internet.email',\r\n    },\r\n    // !end\r\n  },\r\n  // !code: schema_more // !end\r\n};\r\n\r\n// Define optional, non-JSON-schema extensions.\r\nlet extensions = {\r\n  // GraphQL generation.\r\n  graphql: {\r\n    // !code: graphql_header\r\n    name: 'User',\r\n    service: {\r\n      sort: { _id: 1 },\r\n    },\r\n    // sql: {\r\n    //   sqlTable: 'Users',\r\n    //   uniqueKey: '_id',\r\n    //   sqlColumn: {\r\n    //     __authorId__: '__author_id__',\r\n    //   },\r\n    // },\r\n    // !end\r\n    discard: [\r\n      // !code: graphql_discard // !end\r\n    ],\r\n    add: {\r\n      // !<DEFAULT> code: graphql_add\r\n      // __author__: { type: '__User__!', args: false, relation: { ourTable: '__authorId__', otherTable: '_id' } },\r\n      // !end\r\n    },\r\n    // !code: graphql_more // !end\r\n  },\r\n};\r\n\r\n// !code: more // !end\r\n\r\nlet moduleExports = {\r\n  schema,\r\n  extensions,\r\n  // !code: moduleExports // !end\r\n};\r\n\r\n// !code: exports // !end\r\nmodule.exports = moduleExports;\r\n\r\n// !code: funcs // !end\r\n// !code: end // !end\r\n\r\n```\r\n\r\n### Actual behavior\r\nThe mongoose and validate files are not regenerated.\r\n\r\n```text\r\n? What is the name of the service? users\r\n\r\nWe are updating an existing service in dir chatapp-api-plus\r\n\r\nRun \"feathers-plus generate graphql\" afterwards if you want any\r\nschema changes to also be handled in GraphQL.\r\n\r\n? What is the name of the service? users\r\n? What would you call one row in the users database? user\r\n? What kind of service is it? Mongoose\r\n? Place service code in which nested folder, e.g. `v1/blog`? (optional) admin\r\n? Which path should the service be registered on? /users\r\n? Does the service require authentication? Yes\r\n? Should this be served by GraphQL? Yes\r\n     skip src/typings.d.ts\r\n     skip src/mongoose.js\r\n     skip src/typings.d.ts\r\n     skip src/mongoose.js\r\n     skip test/services/users.test.js\r\n     skip src/services/admin/users/users.class.js\r\n     skip src/services/admin/users/users.interface.js\r\n     skip src/app.interface.ts\r\n     skip src/typings.d.ts\r\n    force config/default.json\r\n    force src/app.js\r\n    force src/models/admin/users.model.js\r\n    force src/services/admin/users/users.service.js\r\n    force src/services/admin/users/users.schema.js\r\n    force src/services/admin/users/users.mongo.js\r\n    force src/services/admin/users/users.mongoose.js\r\n    force src/services/admin/users/users.sequelize.js\r\n    force src/services/admin/users/users.validate.js\r\n    force src/services/admin/users/users.hooks.js\r\n    force src/services/index.js\r\n\r\n```\r\n\r\n### System configuration\r\n\r\nTell us about the applicable parts of your setup.\r\n\r\n**Module versions** (especially the part that's not working):\r\n\r\n**NodeJS version**:\r\nv10.1.0\r\n\r\n**Operating System**:\r\nDistributor ID:\tLinuxMint\r\nDescription:\tLinux Mint 18.3 Sylvia\r\nRelease:\t18.3\r\nCodename:\ts\r\n"}}
{"actor":{"display_login":"abhisekp"}}