{"action":"created","comment":{"url":"https://api.github.com/repos/influunt/influunt/pulls/comments/93233430","pull_request_review_id":13754932,"id":93233430,"diff_hunk":"@@ -0,0 +1,41 @@\n+# Envelopagem das Mensagens\n+\n+Todas as mensagens trafegadas na aplicação devem ser envelopadas conforme as definições desse documento.\n+\n+## Envelope Padrão\n+O envelope é um padrão _JSON_ que contém informações básicas de rastreamento da mensagem, bem como seu próprio conteúdo. Uma mensagem sempre tem como origem ou destino um controlador específico. Dessa forma, o envelope deve conter sempre o _id_ do controlador.\n+\n+Os seguintes campos são obrigatórios no envelope:\n+\n+### Campos Obrigatórios\n+\n+| Campo| Tipo | Descrição |\n+| ------------ | ------------- | ------------ |\n+| tipoMensagem | Texto  | Código único que identifica o tipo de mensagem que está dentro do envelope. As mensagens que podem ser envelopadas estão definidas na seção [mensagens](comunicacao/mensagens.md) |\n+| idControlador | UUID | Identificador do Controlador |\n+| idMensagem | UUID  | Identificador único e global no formato _UUID_ que identifica unicamente essa mensagem. Deve ser gerado no momento da construção do envelope |\n+| destino | Texto  | Tópico _MQTT_ em que a mensagem deve ser publicada. Para lista de tópicos veja a seção [MQTT](comunicacao/mqtt) |\n+| qos | Inteiro | Qualidade do serviço no protocolo _MQTT_ que deve ser empregado para esse envelope. Deve estar de acordo com os requisitos da [mensagem](comunicacao/mensagens.md) |\n+| carimboDeTempo | Número Longo | Carimbo de tempo referente ao momento de criação do envelope. Deve estar no formato milissegundo desde 1 de janeiro de 1970 UTC|\n+| conteudo | Objeto _JSON_ ou Texto Criptografado representando um Objeto _JSON_ | Mensagem a ser entregue pelo envelope. Pode ser diretamente o objeto _JSON_ ou, nos casos onde seja requerido, criptografado e convertido para _BASE64_|\n+| emResposta | UUID | Identificador único e global no formato _UUID_ da mensagem original para quando essa for uma resposta |\n+\n+\n+\n+A seguir é apresentado um exemplo de envelope:\n+\n+### Exemplo de Envelope\n+\n+```JSON\n+  {\n+    'tipoMensagem': 'CONEXAO',\n+    'idControlador':'56074e06-439b-409f-b37d-4e0dc884084f',\n+    'idMensagem': '56074e06-439b-409f-b37d-4e0dc8840856'\n+    'destino': '/controladores/56074e06-439b-409f-b37d-4e0dc884084f/atualizarConfiguracoes',\n+    'qos': 1,\n+    'carimboDeTempo': '1471272798600',\n+    'conteudo' : {},\n+    'emResposta': '56074e06-439b-409f-b37d-4e0dc884084d'\n+  }","path":"influunt-doc/docs/comunicacao/envelope.md","position":39,"original_position":39,"commit_id":"99ce0e7253d6cd4ec88f7816f59d2262d9a3e99f","original_commit_id":"99ce0e7253d6cd4ec88f7816f59d2262d9a3e99f","user":{"login":"pauloFernandes","id":2263368,"avatar_url":"https://avatars.githubusercontent.com/u/2263368?v=3","gravatar_id":"","url":"https://api.github.com/users/pauloFernandes","html_url":"https://github.com/pauloFernandes","followers_url":"https://api.github.com/users/pauloFernandes/followers","following_url":"https://api.github.com/users/pauloFernandes/following{/other_user}","gists_url":"https://api.github.com/users/pauloFernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/pauloFernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauloFernandes/subscriptions","organizations_url":"https://api.github.com/users/pauloFernandes/orgs","repos_url":"https://api.github.com/users/pauloFernandes/repos","events_url":"https://api.github.com/users/pauloFernandes/events{/privacy}","received_events_url":"https://api.github.com/users/pauloFernandes/received_events","type":"User","site_admin":false},"body":"Diversos parses de JSON (inclusive o JSON.parse do javascript) não suportam strings limitadas por `'`. Sugiro alterar a documentação onde há `'strings denotadas assim'` nos JSON's e altera-las `\"para strings duplas\"`","created_at":"2016-12-20T13:08:35Z","updated_at":"2016-12-20T13:08:35Z","html_url":"https://github.com/influunt/influunt/pull/1699#discussion_r93233430","pull_request_url":"https://api.github.com/repos/influunt/influunt/pulls/1699","_links":{"self":{"href":"https://api.github.com/repos/influunt/influunt/pulls/comments/93233430"},"html":{"href":"https://github.com/influunt/influunt/pull/1699#discussion_r93233430"},"pull_request":{"href":"https://api.github.com/repos/influunt/influunt/pulls/1699"}}},"pull_request":{"url":"https://api.github.com/repos/influunt/influunt/pulls/1699","id":98596136,"html_url":"https://github.com/influunt/influunt/pull/1699","diff_url":"https://github.com/influunt/influunt/pull/1699.diff","patch_url":"https://github.com/influunt/influunt/pull/1699.patch","issue_url":"https://api.github.com/repos/influunt/influunt/issues/1699","number":1699,"state":"open","locked":false,"title":"inclusao da documentacao em stage","user":{"login":"rodrigosol","id":99245,"avatar_url":"https://avatars.githubusercontent.com/u/99245?v=3","gravatar_id":"","url":"https://api.github.com/users/rodrigosol","html_url":"https://github.com/rodrigosol","followers_url":"https://api.github.com/users/rodrigosol/followers","following_url":"https://api.github.com/users/rodrigosol/following{/other_user}","gists_url":"https://api.github.com/users/rodrigosol/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrigosol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrigosol/subscriptions","organizations_url":"https://api.github.com/users/rodrigosol/orgs","repos_url":"https://api.github.com/users/rodrigosol/repos","events_url":"https://api.github.com/users/rodrigosol/events{/privacy}","received_events_url":"https://api.github.com/users/rodrigosol/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-19T16:29:20Z","updated_at":"2016-12-20T13:43:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69a48548d0a8a88a1817bc86c490b00d8ff2dbb9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/influunt/influunt/pulls/1699/commits","review_comments_url":"https://api.github.com/repos/influunt/influunt/pulls/1699/comments","review_comment_url":"https://api.github.com/repos/influunt/influunt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influunt/influunt/issues/1699/comments","statuses_url":"https://api.github.com/repos/influunt/influunt/statuses/99ce0e7253d6cd4ec88f7816f59d2262d9a3e99f","head":{"label":"influunt:documentacao_log","ref":"documentacao_log","sha":"99ce0e7253d6cd4ec88f7816f59d2262d9a3e99f","user":{"login":"influunt","id":19677350,"avatar_url":"https://avatars.githubusercontent.com/u/19677350?v=3","gravatar_id":"","url":"https://api.github.com/users/influunt","html_url":"https://github.com/influunt","followers_url":"https://api.github.com/users/influunt/followers","following_url":"https://api.github.com/users/influunt/following{/other_user}","gists_url":"https://api.github.com/users/influunt/gists{/gist_id}","starred_url":"https://api.github.com/users/influunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influunt/subscriptions","organizations_url":"https://api.github.com/users/influunt/orgs","repos_url":"https://api.github.com/users/influunt/repos","events_url":"https://api.github.com/users/influunt/events{/privacy}","received_events_url":"https://api.github.com/users/influunt/received_events","type":"Organization","site_admin":false},"repo":{"id":60134030,"name":"influunt","full_name":"influunt/influunt","owner":{"login":"influunt","id":19677350,"avatar_url":"https://avatars.githubusercontent.com/u/19677350?v=3","gravatar_id":"","url":"https://api.github.com/users/influunt","html_url":"https://github.com/influunt","followers_url":"https://api.github.com/users/influunt/followers","following_url":"https://api.github.com/users/influunt/following{/other_user}","gists_url":"https://api.github.com/users/influunt/gists{/gist_id}","starred_url":"https://api.github.com/users/influunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influunt/subscriptions","organizations_url":"https://api.github.com/users/influunt/orgs","repos_url":"https://api.github.com/users/influunt/repos","events_url":"https://api.github.com/users/influunt/events{/privacy}","received_events_url":"https://api.github.com/users/influunt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influunt/influunt","description":null,"fork":false,"url":"https://api.github.com/repos/influunt/influunt","forks_url":"https://api.github.com/repos/influunt/influunt/forks","keys_url":"https://api.github.com/repos/influunt/influunt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influunt/influunt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influunt/influunt/teams","hooks_url":"https://api.github.com/repos/influunt/influunt/hooks","issue_events_url":"https://api.github.com/repos/influunt/influunt/issues/events{/number}","events_url":"https://api.github.com/repos/influunt/influunt/events","assignees_url":"https://api.github.com/repos/influunt/influunt/assignees{/user}","branches_url":"https://api.github.com/repos/influunt/influunt/branches{/branch}","tags_url":"https://api.github.com/repos/influunt/influunt/tags","blobs_url":"https://api.github.com/repos/influunt/influunt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influunt/influunt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influunt/influunt/git/refs{/sha}","trees_url":"https://api.github.com/repos/influunt/influunt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influunt/influunt/statuses/{sha}","languages_url":"https://api.github.com/repos/influunt/influunt/languages","stargazers_url":"https://api.github.com/repos/influunt/influunt/stargazers","contributors_url":"https://api.github.com/repos/influunt/influunt/contributors","subscribers_url":"https://api.github.com/repos/influunt/influunt/subscribers","subscription_url":"https://api.github.com/repos/influunt/influunt/subscription","commits_url":"https://api.github.com/repos/influunt/influunt/commits{/sha}","git_commits_url":"https://api.github.com/repos/influunt/influunt/git/commits{/sha}","comments_url":"https://api.github.com/repos/influunt/influunt/comments{/number}","issue_comment_url":"https://api.github.com/repos/influunt/influunt/issues/comments{/number}","contents_url":"https://api.github.com/repos/influunt/influunt/contents/{+path}","compare_url":"https://api.github.com/repos/influunt/influunt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influunt/influunt/merges","archive_url":"https://api.github.com/repos/influunt/influunt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influunt/influunt/downloads","issues_url":"https://api.github.com/repos/influunt/influunt/issues{/number}","pulls_url":"https://api.github.com/repos/influunt/influunt/pulls{/number}","milestones_url":"https://api.github.com/repos/influunt/influunt/milestones{/number}","notifications_url":"https://api.github.com/repos/influunt/influunt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influunt/influunt/labels{/name}","releases_url":"https://api.github.com/repos/influunt/influunt/releases{/id}","deployments_url":"https://api.github.com/repos/influunt/influunt/deployments","created_at":"2016-06-01T00:55:14Z","updated_at":"2016-12-01T12:52:22Z","pushed_at":"2016-12-20T13:05:40Z","git_url":"git://github.com/influunt/influunt.git","ssh_url":"git@github.com:influunt/influunt.git","clone_url":"https://github.com/influunt/influunt.git","svn_url":"https://github.com/influunt/influunt","homepage":null,"size":153069,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"staging"}},"base":{"label":"influunt:staging","ref":"staging","sha":"831ea2feabb0c87efc37d5f4677bcfd2a7bfd991","user":{"login":"influunt","id":19677350,"avatar_url":"https://avatars.githubusercontent.com/u/19677350?v=3","gravatar_id":"","url":"https://api.github.com/users/influunt","html_url":"https://github.com/influunt","followers_url":"https://api.github.com/users/influunt/followers","following_url":"https://api.github.com/users/influunt/following{/other_user}","gists_url":"https://api.github.com/users/influunt/gists{/gist_id}","starred_url":"https://api.github.com/users/influunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influunt/subscriptions","organizations_url":"https://api.github.com/users/influunt/orgs","repos_url":"https://api.github.com/users/influunt/repos","events_url":"https://api.github.com/users/influunt/events{/privacy}","received_events_url":"https://api.github.com/users/influunt/received_events","type":"Organization","site_admin":false},"repo":{"id":60134030,"name":"influunt","full_name":"influunt/influunt","owner":{"login":"influunt","id":19677350,"avatar_url":"https://avatars.githubusercontent.com/u/19677350?v=3","gravatar_id":"","url":"https://api.github.com/users/influunt","html_url":"https://github.com/influunt","followers_url":"https://api.github.com/users/influunt/followers","following_url":"https://api.github.com/users/influunt/following{/other_user}","gists_url":"https://api.github.com/users/influunt/gists{/gist_id}","starred_url":"https://api.github.com/users/influunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influunt/subscriptions","organizations_url":"https://api.github.com/users/influunt/orgs","repos_url":"https://api.github.com/users/influunt/repos","events_url":"https://api.github.com/users/influunt/events{/privacy}","received_events_url":"https://api.github.com/users/influunt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influunt/influunt","description":null,"fork":false,"url":"https://api.github.com/repos/influunt/influunt","forks_url":"https://api.github.com/repos/influunt/influunt/forks","keys_url":"https://api.github.com/repos/influunt/influunt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influunt/influunt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influunt/influunt/teams","hooks_url":"https://api.github.com/repos/influunt/influunt/hooks","issue_events_url":"https://api.github.com/repos/influunt/influunt/issues/events{/number}","events_url":"https://api.github.com/repos/influunt/influunt/events","assignees_url":"https://api.github.com/repos/influunt/influunt/assignees{/user}","branches_url":"https://api.github.com/repos/influunt/influunt/branches{/branch}","tags_url":"https://api.github.com/repos/influunt/influunt/tags","blobs_url":"https://api.github.com/repos/influunt/influunt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influunt/influunt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influunt/influunt/git/refs{/sha}","trees_url":"https://api.github.com/repos/influunt/influunt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influunt/influunt/statuses/{sha}","languages_url":"https://api.github.com/repos/influunt/influunt/languages","stargazers_url":"https://api.github.com/repos/influunt/influunt/stargazers","contributors_url":"https://api.github.com/repos/influunt/influunt/contributors","subscribers_url":"https://api.github.com/repos/influunt/influunt/subscribers","subscription_url":"https://api.github.com/repos/influunt/influunt/subscription","commits_url":"https://api.github.com/repos/influunt/influunt/commits{/sha}","git_commits_url":"https://api.github.com/repos/influunt/influunt/git/commits{/sha}","comments_url":"https://api.github.com/repos/influunt/influunt/comments{/number}","issue_comment_url":"https://api.github.com/repos/influunt/influunt/issues/comments{/number}","contents_url":"https://api.github.com/repos/influunt/influunt/contents/{+path}","compare_url":"https://api.github.com/repos/influunt/influunt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influunt/influunt/merges","archive_url":"https://api.github.com/repos/influunt/influunt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influunt/influunt/downloads","issues_url":"https://api.github.com/repos/influunt/influunt/issues{/number}","pulls_url":"https://api.github.com/repos/influunt/influunt/pulls{/number}","milestones_url":"https://api.github.com/repos/influunt/influunt/milestones{/number}","notifications_url":"https://api.github.com/repos/influunt/influunt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influunt/influunt/labels{/name}","releases_url":"https://api.github.com/repos/influunt/influunt/releases{/id}","deployments_url":"https://api.github.com/repos/influunt/influunt/deployments","created_at":"2016-06-01T00:55:14Z","updated_at":"2016-12-01T12:52:22Z","pushed_at":"2016-12-20T13:05:40Z","git_url":"git://github.com/influunt/influunt.git","ssh_url":"git@github.com:influunt/influunt.git","clone_url":"https://github.com/influunt/influunt.git","svn_url":"https://github.com/influunt/influunt","homepage":null,"size":153069,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/influunt/influunt/pulls/1699"},"html":{"href":"https://github.com/influunt/influunt/pull/1699"},"issue":{"href":"https://api.github.com/repos/influunt/influunt/issues/1699"},"comments":{"href":"https://api.github.com/repos/influunt/influunt/issues/1699/comments"},"review_comments":{"href":"https://api.github.com/repos/influunt/influunt/pulls/1699/comments"},"review_comment":{"href":"https://api.github.com/repos/influunt/influunt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influunt/influunt/pulls/1699/commits"},"statuses":{"href":"https://api.github.com/repos/influunt/influunt/statuses/99ce0e7253d6cd4ec88f7816f59d2262d9a3e99f"}}}}
{"actor":{"display_login":"pauloFernandes"}}