{"action":"created","issue":{"url":"https://api.github.com/repos/apiaryio/api-blueprint/issues/47","labels_url":"https://api.github.com/repos/apiaryio/api-blueprint/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/apiaryio/api-blueprint/issues/47/comments","events_url":"https://api.github.com/repos/apiaryio/api-blueprint/issues/47/events","html_url":"https://github.com/apiaryio/api-blueprint/issues/47","id":24436513,"number":47,"title":"Traits","user":{"login":"zdne","id":613617,"avatar_url":"https://avatars.githubusercontent.com/u/613617?v=3","gravatar_id":"","url":"https://api.github.com/users/zdne","html_url":"https://github.com/zdne","followers_url":"https://api.github.com/users/zdne/followers","following_url":"https://api.github.com/users/zdne/following{/other_user}","gists_url":"https://api.github.com/users/zdne/gists{/gist_id}","starred_url":"https://api.github.com/users/zdne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdne/subscriptions","organizations_url":"https://api.github.com/users/zdne/orgs","repos_url":"https://api.github.com/users/zdne/repos","events_url":"https://api.github.com/users/zdne/events{/privacy}","received_events_url":"https://api.github.com/users/zdne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apiaryio/api-blueprint/labels/scope%20(1):%20Language","name":"scope (1): Language","color":"59A077"},{"url":"https://api.github.com/repos/apiaryio/api-blueprint/labels/status%20(6):%20Cancelled","name":"status (6): Cancelled","color":"5319e7"},{"url":"https://api.github.com/repos/apiaryio/api-blueprint/labels/type%20(2):%20Feature","name":"type (2): Feature","color":"3C7ABD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":47,"created_at":"2013-12-17T17:27:11Z","updated_at":"2015-12-10T09:49:02Z","closed_at":null,"body":"Introducing the API Blueprint Object Trait. Addressing following milestones:\r\n\r\n- #11 Authentication\r\n- #17 Referenced HTTP headers\r\n- #19 Referenced Payloads\r\n- #24 Global query URI parameter\r\n- #36 Support for Scopes\r\n- #38 Support for Specific Metadata\r\n\r\nFull implementation of traits assume following issues are implemented:\r\n\r\n- #25 Message-body Parameters Description\r\n- #26 Parametric Headers Description\r\n- #28 Nested Parameters\r\n\r\n## What is a Trait\r\nTrait is a quality or characteristic of an API Blueprint object (hereafter just *object*). At the moment the following sections of API Blueprint are recognized as API Blueprint object:\r\n\r\n- API \r\n- Resource Group\r\n- Resource\r\n- Resource Model\r\n- Action\r\n- Request\r\n- Response\r\n- Parameter\r\n\r\nTraits can be used add additional semantics or a set of characteristics to an object.\r\n\r\n### Semantic Trait\r\nA semantic traits adds a semantic meaning to an object.\r\n\r\nDefinition of a semantic trait:\r\n\r\n    # My API\r\n    + Trait A ... Object Quality \"A\"\r\n\r\nReferencing a defined trait:\r\n    \r\n    ## Resource 1 [/1]\r\n    + Traits\r\n        + [A][]\r\n\r\nIn-place definition & use of a semantic trait:\r\n\r\n    ## Resource 1 [/1]\r\n    + Traits\r\n        + A ... Object Quality \"A\"\r\n\r\nNOTE: Traits defined in-place cannot be referenced later\r\n    \r\nAn object can reference multiple traits:\r\n\r\n    ## Resource 1 [/1]\r\n    + Traits\r\n        + [A][]\r\n        + [B][]\r\n        + C ... Object Quality \"C\"\r\n        + Type = `safe`\r\n\r\n### Characteristic Trait\r\nIn addition to its semantic meaning a trait can also express certain characteristic of object's [payload(s)](https://github.com/apiaryio/api-blueprint/blob/1B/Glossary%20of%20Terms.md#def-payload). \r\n\r\nWhere payload characteristic is one of:\r\n\r\n- parameter characteristic \r\n- property characteristic (new in Format 1B)\r\n- [request | response] header characteristic\r\n- body characteristic \r\n- schema characteristic \r\n\r\nFor example:\r\n\r\n    # My API\r\n    + Trait Color\r\n        + Response Headers\r\n            + X-Resource-Color (string, `red`) ... Color of the resource.\r\n    \r\n    ## Resource 1 [/1]\r\n    + Traits\r\n        + [Color][]\r\n\r\n\r\nOne trait can also represent a set of object characteristics:\r\n\r\n    # My API\r\n    + Trait Art\r\n        + Headers\r\n            + X-Resource-Color (optional, string, `red`) ... Color of the resource\r\n\r\n        + Properties\r\n            + size = `42` (number) ... The size of an object\r\n    \r\n    ## Resource 1 [/1]\r\n    + Traits\r\n        + [Art][]\r\n\r\n---\r\n\r\nFor more examples see https://gist.github.com/zdne/01e287fe18d232672d43"},"comment":{"url":"https://api.github.com/repos/apiaryio/api-blueprint/issues/comments/163558832","html_url":"https://github.com/apiaryio/api-blueprint/issues/47#issuecomment-163558832","issue_url":"https://api.github.com/repos/apiaryio/api-blueprint/issues/47","id":163558832,"user":{"login":"zdne","id":613617,"avatar_url":"https://avatars.githubusercontent.com/u/613617?v=3","gravatar_id":"","url":"https://api.github.com/users/zdne","html_url":"https://github.com/zdne","followers_url":"https://api.github.com/users/zdne/followers","following_url":"https://api.github.com/users/zdne/following{/other_user}","gists_url":"https://api.github.com/users/zdne/gists{/gist_id}","starred_url":"https://api.github.com/users/zdne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdne/subscriptions","organizations_url":"https://api.github.com/users/zdne/orgs","repos_url":"https://api.github.com/users/zdne/repos","events_url":"https://api.github.com/users/zdne/events{/privacy}","received_events_url":"https://api.github.com/users/zdne/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T09:49:02Z","updated_at":"2015-12-10T09:49:02Z","body":"@netmikey it is not dying it all! Actually blueprint is doing better than ever. Spoiler: We have a big announcement coming next week and in the weeks to follow. It is just this issue is not going to happen as proposed here, but there are / will be features to address this functionality."}}