{"action":"created","issue":{"url":"https://api.github.com/repos/horiuchi/dtsgenerator/issues/33","repository_url":"https://api.github.com/repos/horiuchi/dtsgenerator","labels_url":"https://api.github.com/repos/horiuchi/dtsgenerator/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/horiuchi/dtsgenerator/issues/33/comments","events_url":"https://api.github.com/repos/horiuchi/dtsgenerator/issues/33/events","html_url":"https://github.com/horiuchi/dtsgenerator/issues/33","id":146727922,"number":33,"title":"Error: id not found","user":{"login":"ianks","id":3303032,"avatar_url":"https://avatars.githubusercontent.com/u/3303032?v=3","gravatar_id":"","url":"https://api.github.com/users/ianks","html_url":"https://github.com/ianks","followers_url":"https://api.github.com/users/ianks/followers","following_url":"https://api.github.com/users/ianks/following{/other_user}","gists_url":"https://api.github.com/users/ianks/gists{/gist_id}","starred_url":"https://api.github.com/users/ianks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianks/subscriptions","organizations_url":"https://api.github.com/users/ianks/orgs","repos_url":"https://api.github.com/users/ianks/repos","events_url":"https://api.github.com/users/ianks/events{/privacy}","received_events_url":"https://api.github.com/users/ianks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-07T20:02:57Z","updated_at":"2016-06-16T02:58:00Z","closed_at":"2016-04-11T14:46:25Z","body":"Testing against the JSONAPI schema, I received the bug below against version 0.4.0.\r\n\r\nTo recreate, run this command: `curl jsonapi.org/schema | dtsgen`\r\n\r\n```\r\n{ '$schema': 'http://json-schema.org/draft-04/schema#',\r\n  title: 'JSON API Schema',\r\n  description: 'This is a schema for responses in the JSON API format. For more, see http://jsonapi.org',\r\n  oneOf: \r\n   [ { '$ref': '#/definitions/success' },\r\n     { '$ref': '#/definitions/failure' },\r\n     { '$ref': '#/definitions/info' } ],\r\n  definitions: \r\n   { success: \r\n      { type: 'object',\r\n        required: [Object],\r\n        properties: [Object],\r\n        additionalProperties: false },\r\n     failure: \r\n      { type: 'object',\r\n        required: [Object],\r\n        properties: [Object],\r\n        additionalProperties: false },\r\n     info: \r\n      { type: 'object',\r\n        required: [Object],\r\n        properties: [Object],\r\n        additionalProperties: false },\r\n     meta: \r\n      { description: 'Non-standard meta-information that can not be represented as an attribute or relationship.',\r\n        type: 'object',\r\n        additionalProperties: true },\r\n     data: \r\n      { description: 'The document\\'s \"primary data\" is a representation of the resource or collection of resources targeted by a request.',\r\n        oneOf: [Object] },\r\n     resource: \r\n      { description: '\"Resource objects\" appear in a JSON API document to represent resources.',\r\n        type: 'object',\r\n        required: [Object],\r\n        properties: [Object],\r\n        additionalProperties: false },\r\n     links: \r\n      { description: 'A resource object **MAY** contain references to other resource objects (\"relationships\"). Relationships may be to-one or to-many. Relationships can be specified by including a member in a resource\\'s links object.',\r\n        type: 'object',\r\n        properties: [Object],\r\n        additionalProperties: true },\r\n     link: \r\n      { description: 'A link **MUST** be represented as either: a string containing the link\\'s URL or a link object.',\r\n        oneOf: [Object] },\r\n     attributes: \r\n      { description: 'Members of the attributes object (\"attributes\") represent information about the resource object in which it\\'s defined.',\r\n        type: 'object',\r\n        patternProperties: [Object],\r\n        additionalProperties: false },\r\n     relationships: \r\n      { description: 'Members of the relationships object (\"relationships\") represent references from the resource object in which it\\'s defined to other resource objects.',\r\n        type: 'object',\r\n        patternProperties: [Object],\r\n        additionalProperties: false },\r\n     relationshipToOne: \r\n      { description: 'References to other resource objects in a to-one (\"relationship\"). Relationships can be specified by including a member in a resource\\'s links object.',\r\n        anyOf: [Object] },\r\n     relationshipToMany: \r\n      { description: 'An array of objects each containing \"type\" and \"id\" members for to-many relationships.',\r\n        type: 'array',\r\n        items: [Object],\r\n        uniqueItems: true },\r\n     empty: \r\n      { description: 'Describes an empty to-one relationship.',\r\n        type: 'null' },\r\n     linkage: \r\n      { description: 'The \"type\" and \"id\" to non-empty members.',\r\n        type: 'object',\r\n        required: [Object],\r\n        properties: [Object],\r\n        additionalProperties: false },\r\n     pagination: { type: 'object', properties: [Object] },\r\n     jsonapi: \r\n      { description: 'An object describing the server\\'s implementation',\r\n        type: 'object',\r\n        properties: [Object],\r\n        additionalProperties: false },\r\n     error: \r\n      { type: 'object',\r\n        properties: [Object],\r\n        additionalProperties: false } } }\r\n/home/ianks/.nvm/versions/node/v5.8.0/lib/node_modules/dtsgenerator/src/generator.js:11\r\n            throw new Error('id is not found.');\r\n            ^\r\n\r\nError: id is not found.\r\n    at new Generator (/home/ianks/.nvm/versions/node/v5.8.0/lib/node_modules/dtsgenerator/src/generator.js:11:19)\r\n    at Function.Generator.add (/home/ianks/.nvm/versions/node/v5.8.0/lib/node_modules/dtsgenerator/src/generator.js:50:17)\r\n    at /home/ianks/.nvm/versions/node/v5.8.0/lib/node_modules/dtsgenerator/src/index.js:12:20\r\n    at Array.forEach (native)\r\n    at dtsgenerator (/home/ianks/.nvm/versions/node/v5.8.0/lib/node_modules/dtsgenerator/src/index.js:11:13)\r\n    at processGenerate (/home/ianks/.nvm/versions/node/v5.8.0/lib/node_modules/dtsgenerator/src/cli.js:62:18)\r\n    at Socket.<anonymous> (/home/ianks/.nvm/versions/node/v5.8.0/lib/node_modules/dtsgenerator/src/cli.js:40:9)\r\n    at emitNone (events.js:85:20)\r\n    at Socket.emit (events.js:179:7)\r\n    at endReadableNT (_stream_readable.js:913:12)\r\n```"},"comment":{"url":"https://api.github.com/repos/horiuchi/dtsgenerator/issues/comments/226376090","html_url":"https://github.com/horiuchi/dtsgenerator/issues/33#issuecomment-226376090","issue_url":"https://api.github.com/repos/horiuchi/dtsgenerator/issues/33","id":226376090,"user":{"login":"ianks","id":3303032,"avatar_url":"https://avatars.githubusercontent.com/u/3303032?v=3","gravatar_id":"","url":"https://api.github.com/users/ianks","html_url":"https://github.com/ianks","followers_url":"https://api.github.com/users/ianks/followers","following_url":"https://api.github.com/users/ianks/following{/other_user}","gists_url":"https://api.github.com/users/ianks/gists{/gist_id}","starred_url":"https://api.github.com/users/ianks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianks/subscriptions","organizations_url":"https://api.github.com/users/ianks/orgs","repos_url":"https://api.github.com/users/ianks/repos","events_url":"https://api.github.com/users/ianks/events{/privacy}","received_events_url":"https://api.github.com/users/ianks/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T02:58:00Z","updated_at":"2016-06-16T02:58:00Z","body":"Maybe we could allow the option to pass in a `--interface-name` argument to the CLI, which could be used if there is no `id` in the schema. Thoughts?"}}
{"actor":{"display_login":"ianks"}}