{"id":2132,"date":"2016-01-26T07:59:48","date_gmt":"2016-01-26T07:59:47","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2132"},"modified":"2019-05-18T06:43:04","modified_gmt":"2019-05-18T13:43:04","slug":"how-to-validate-documents-types-in-sync-gateway","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/how-to-validate-documents-types-in-sync-gateway\/","title":{"rendered":"Como validar tipos de documentos no Sync Gateway"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"color: #333333; font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/january\/how-to-validate-documents-types-in-sync-gateway\/screen-shot-2016-01-19-at-3.00.04-am.png\" \/>No blog anterior da s\u00e9rie Sync Gateway, exploramos <a href=\"https:\/\/www.couchbase.com\/blog\/pt\/how-to-authorize-users-in-sync-gateway\/\">Como autenticar e autorizar usu\u00e1rios<\/a> em um aplicativo por meio de alguns dos recursos do Sync Gateway.  Com base nessa s\u00e9rie, exploraremos agora como validar tipos de documentos em <a href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/1.1.0\/develop\/guides\/sync-gateway\/index.html\">Gateway de sincroniza\u00e7\u00e3o<\/a> para determinar sua acessibilidade do lado do cliente m\u00f3vel com um usu\u00e1rio espec\u00edfico.  Isso levar\u00e1 \u00e0 discuss\u00e3o do canal sobre como o Couchbase Mobile faz a seguran\u00e7a do lado da leitura no pr\u00f3ximo blog da nossa s\u00e9rie.  Para a seguran\u00e7a do lado da grava\u00e7\u00e3o, exploraremos os principais m\u00e9todos na fun\u00e7\u00e3o Sync que permitiriam que determinados documentos provenientes de usu\u00e1rios conhecidos fossem gravados no banco de dados backend. <\/span><\/p>\n<h3 style=\"text-align: justify;\">Fun\u00e7\u00e3o de sincroniza\u00e7\u00e3o<\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #333333; font-family: Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #ffffff;\">Imagine que temos um documento ou muitos documentos em nosso banco de dados, por exemplo, em que temos uma chave de tipo que referenciaremos em nosso c\u00f3digo de valida\u00e7\u00e3o.  O cora\u00e7\u00e3o do Sync Gateway \u00e9 a l\u00f3gica de implementa\u00e7\u00e3o da fun\u00e7\u00e3o de sincroniza\u00e7\u00e3o e, abaixo, vemos como um tipo de documento pode ser verificado para os controles de acessibilidade dos usu\u00e1rios em um aplicativo. \u00a0 <\/span><\/p>\n<pre><code class=\"\u201cjavascript\" language-javascript=\"\">\u201csync\u201d : \u2018\r\n  function(doc, oldDoc) { \r\n    if (doc.type == \u201cfriends\u201d) {          \/\/Process new friends document\r\n       requireUser(doc.owner);            \/\/The owner of the friends\r\n       access(doc.friends, \u201citems-\u201d+doc.owner);    \r\n       channel(\u201cprivate-\u201d+doc.owner);\r\n       access(doc.owner, \u201cprivate-\u201d+doc.owner)   \r\n    }   \r\n    else if (doc.type == \u201cvehicles\u201d){\r\n       requireUser(doc.owner);          \/\/The owner of the vehicles document\r\n       access(doc.vehicles, \u201citems-\u201d+doc.owner);    \r\n       channel(\u201cprivate-\u201d+doc.owner);\r\n       access(doc.owner, \u201cprivate-\u201d+doc.owner)  \r\n    }\r\n    else{\r\n       requireUser(doc.owner)\r\n       channel(\u201citems-\u201d+doc.owner);  \r\n    }\r\n  }\u2018 \r\n<\/code><\/pre>\n<p style=\"text-align: justify;\">Com o campo \"type\" nos documentos, podemos diferenciar por valores espec\u00edficos o que o documento representa.  Se um tipo de documento representar \"escolas\", \"ve\u00edculos\" ou \"amigos\", ent\u00e3o, na fun\u00e7\u00e3o de sincroniza\u00e7\u00e3o, podemos adicionar uma instru\u00e7\u00e3o de altern\u00e2ncia para capturar como permitiremos o processamento de diferentes tipos de documentos de maneiras diferentes na fun\u00e7\u00e3o de sincroniza\u00e7\u00e3o.  Primeiro, verificamos o tipo de documento para ver se \u00e9 do tipo \"amigos\" e, em seguida, verificamos se a propriedade do propriet\u00e1rio do documento corresponde ao ID do usu\u00e1rio autenticado atual por meio da instru\u00e7\u00e3o '<a href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/1.1.0\/develop\/guides\/sync-gateway\/sync-function-api-guide\/validation\/index.html\">requireUser()<\/a>'.  Se a propriedade owner corresponder ao usu\u00e1rio autenticado atual, daremos acesso a um documento a todos os amigos por meio do canal 'items-doc.owner'.  Isso significa basicamente que ningu\u00e9m mais ver\u00e1 a lista de amigos que foi convidada pelo usu\u00e1rio, pois ela \u00e9 privada apenas para o pr\u00f3prio usu\u00e1rio.<\/p>\n<p style=\"text-align: justify;\">A cl\u00e1usula \"else\" \u00e9 onde, se este n\u00e3o for um documento de um amigo ou de ve\u00edculos,<b> <\/b>ent\u00e3o esse ser\u00e1 um documento de item da escola e, novamente, validamos que a propriedade do propriet\u00e1rio corresponde ao ID do usu\u00e1rio autenticado atual.  Como antes,<b> <\/b>adicionamos os itens ao canal 'items-' para a propriedade do propriet\u00e1rio do item e damos a esse usu\u00e1rio acesso a esse canal.<\/p>\n<div>Embora tenhamos atualizado a fun\u00e7\u00e3o Sync com a l\u00f3gica de altern\u00e2ncia acima, podemos adicionar um teste adicional para rejeitar qualquer tipo de documento desconhecido; portanto, se n\u00e3o for um documento do tipo \"amigos\", \"ve\u00edculos\" ou \"escolas\", rejeitaremos o documento chamando a fun\u00e7\u00e3o '<a href=\"https:\/\/developer.couchbase.com\/documentation\/mobile\/1.1.0\/develop\/guides\/sync-gateway\/sync-function-api-guide\/validation\/index.html\">lan\u00e7ar()<\/a>' m\u00e9todo.<\/div>\n<pre><code class=\"\u201cjavascript\" language-javascript=\"\">else{\r\n  throw({forbidden: \u201cInvalid document type\u201d}); \r\n} <\/code><\/pre>\n<p style=\"text-align: justify;\">Em vez do m\u00e9todo 'requireUser()', vamos substitu\u00ed-lo pelo m\u00e9todo<b> <\/b>O m\u00e9todo 'requireAccess(\"items-\"+doc.owner)' agora, basicamente, se voc\u00ea quiser gravar um novo item em uma lista, precisar\u00e1 ter acesso ao canal de itens do usu\u00e1rio espec\u00edfico para o qual deseja adicionar o item.<\/p>\n<pre><code class=\"\u201cjavascript\" language-javascript=\"\" log=\"\" :=\"\" databases=\"\" nlp-sync=\"\" server=\"\" walrus:=\"\" bucket=\"\" users=\"\" sooa=\"\" disabled=\"disabled\" false=\"\" password=\"\" admin_channels=\"\" items-sooa=\"\" will=\"\" items-will=\"\" sync=\"\" function=\"\" doc=\"\" olddoc=\"\" if=\"\" type=\"=\" friends=\"\" process=\"\" new=\"\" document=\"\" requireuser=\"\" owner=\"\" the=\"\" of=\"\" access=\"\" items-=\"\" channel=\"\" private-=\"\" else=\"\" vehicles=\"\" throw=\"\" forbidden:=\"\" invalid=\"\" code=\"\"><\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>In the previous blog of the Sync Gateway series, we explored how to Authenticate and Authorize users in an application through some of the Sync Gateway features.\u00a0 Building from the series, we will now explore how to validate Document Types [&hellip;]<\/p>","protected":false},"author":30,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1810],"tags":[],"ppma_author":[8983],"class_list":["post-2132","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-mobile"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Validate Documents Types in Sync Gateway - The Couchbase Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/pt\/how-to-validate-documents-types-in-sync-gateway\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Validate Documents Types in Sync Gateway\" \/>\n<meta property=\"og:description\" content=\"In the previous blog of the Sync Gateway series, we explored how to Authenticate and Authorize users in an application through some of the Sync Gateway features.\u00a0 Building from the series, we will now explore how to validate Document Types [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/how-to-validate-documents-types-in-sync-gateway\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-26T07:59:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-18T13:43:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"William Hoang, Mobile Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"William Hoang, Mobile Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\"},\"author\":{\"name\":\"William Hoang, Mobile Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32\"},\"headline\":\"How to Validate Documents Types in Sync Gateway\",\"datePublished\":\"2016-01-26T07:59:47+00:00\",\"dateModified\":\"2019-05-18T13:43:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\"},\"wordCount\":494,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Couchbase Mobile\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\",\"name\":\"How to Validate Documents Types in Sync Gateway - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-01-26T07:59:47+00:00\",\"dateModified\":\"2019-05-18T13:43:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Validate Documents Types in Sync Gateway\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32\",\"name\":\"William Hoang, Mobile Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/650445f1ea30314c4f3555dd680154f5\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g\",\"caption\":\"William Hoang, Mobile Developer Advocate, Couchbase\"},\"description\":\"William was a Developer Advocate on the Mobile Engineering\/Developer Experience team at Couchbase. His love for coffee and code has transcended him into the world of mobile while appreciating the offline in-person experiences. Prior, William worked on the Developer Relations team over at Twitter, BlackBerry, and Microsoft while also having been a Software Embedded GPS engineer at Research In Motion. William graduated from McGill University in Electrical Software Engineering\",\"url\":\"https:\/\/www.couchbase.com\/blog\/pt\/author\/william-hoang\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Validate Documents Types in Sync Gateway - The Couchbase Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/pt\/how-to-validate-documents-types-in-sync-gateway\/","og_locale":"pt_BR","og_type":"article","og_title":"How to Validate Documents Types in Sync Gateway","og_description":"In the previous blog of the Sync Gateway series, we explored how to Authenticate and Authorize users in an application through some of the Sync Gateway features.\u00a0 Building from the series, we will now explore how to validate Document Types [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/how-to-validate-documents-types-in-sync-gateway\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-01-26T07:59:47+00:00","article_modified_time":"2019-05-18T13:43:04+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2022\/11\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"William Hoang, Mobile Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"William Hoang, Mobile Developer Advocate, Couchbase","Est. reading time":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/"},"author":{"name":"William Hoang, Mobile Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32"},"headline":"How to Validate Documents Types in Sync Gateway","datePublished":"2016-01-26T07:59:47+00:00","dateModified":"2019-05-18T13:43:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/"},"wordCount":494,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Couchbase Mobile"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/","url":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/","name":"How to Validate Documents Types in Sync Gateway - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-01-26T07:59:47+00:00","dateModified":"2019-05-18T13:43:04+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/how-to-validate-documents-types-in-sync-gateway\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Validate Documents Types in Sync Gateway"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"Blog do Couchbase","description":"Couchbase, o banco de dados NoSQL","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"Blog do Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/425717456c198fdf9aaa5d7a6d42ad32","name":"William Hoang, defensor do desenvolvedor m\u00f3vel, Couchbase","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/650445f1ea30314c4f3555dd680154f5","url":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","caption":"William Hoang, Mobile Developer Advocate, Couchbase"},"description":"William foi um defensor do desenvolvedor na equipe de engenharia m\u00f3vel\/experi\u00eancia do desenvolvedor na Couchbase. Seu amor por caf\u00e9 e c\u00f3digo o levou ao mundo dos dispositivos m\u00f3veis, ao mesmo tempo em que apreciava as experi\u00eancias presenciais off-line. Antes disso, William trabalhou na equipe de rela\u00e7\u00f5es com desenvolvedores do Twitter, BlackBerry e Microsoft, al\u00e9m de ter sido engenheiro de GPS incorporado a software na Research In Motion. William se formou na McGill University em Engenharia El\u00e9trica de Software","url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/william-hoang\/"}]}},"authors":[{"term_id":8983,"user_id":30,"is_guest":0,"slug":"william-hoang","display_name":"William Hoang, Mobile Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b912c9a97568a859697ee195432d0bd7cc3ed67d720ae2e6588b67313fa49e08?s=96&d=mm&r=g","author_category":"","last_name":"Hoang","first_name":"William","job_title":"","user_url":"","description":"William foi um defensor do desenvolvedor na equipe de engenharia m\u00f3vel\/experi\u00eancia do desenvolvedor na Couchbase. Seu amor por caf\u00e9 e c\u00f3digo o levou ao mundo dos dispositivos m\u00f3veis, ao mesmo tempo em que apreciava as experi\u00eancias presenciais off-line. Antes disso, William trabalhou na equipe de rela\u00e7\u00f5es com desenvolvedores do Twitter, BlackBerry e Microsoft, al\u00e9m de ter sido engenheiro de GPS incorporado a software na Research In Motion. William se formou na McGill University em Engenharia El\u00e9trica de Software"}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/2132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=2132"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/2132\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=2132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=2132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=2132"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=2132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}