Skip to content

Commit

Permalink
Deploying to gh-pages from @ de9d3d9 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Sep 10, 2024
1 parent f4f2570 commit 63bfaae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arrays/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h3 id="update-strategies">Update strategies</h3>
(meaning that order does not matter, duplicate values are not meaningful, and
non-comparable values such as <code dir="auto">null</code> or <code dir="auto">NaN</code> are not used), the API <b class="font-extrabold text-yellow-700">should</b>
define custom methods using the verbs <code dir="auto">Add</code> and <code dir="auto">Remove</code>:</p>
<starlight-tabs class="astro-esqgolmp"> <div class="tablist-wrapper not-content astro-esqgolmp"> <ul role="tablist" class="astro-esqgolmp"> <li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-56" id="tab-56" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Protocol Buffers </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-57" id="tab-57" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> OpenAPI 3.0 </a> </li> </ul> </div> <section id="tab-panel-56" aria-labelledby="tab-56" role="tabpanel"> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="protobuf"><code><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">rpc AddAuthor(AddAuthorRequest) returns (Book) {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">option</span><span style="--0:#D6DEEB;--1:#403F53"> (google.api.http) </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">post</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#9B504E">"/v1/{book=publishers/*/books/*}:addAuthor"</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">body</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#9B504E">"*"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">};</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">}</span></div></div><div class="ec-line"><div class="code">
<starlight-tabs class="astro-esqgolmp"> <div class="tablist-wrapper not-content astro-esqgolmp"> <ul role="tablist" class="astro-esqgolmp"> <li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-56" id="tab-56" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Protocol Buffers </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-57" id="tab-57" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> OpenAPI 3.0 </a> </li> </ul> </div> <section id="tab-panel-56" aria-labelledby="tab-56" role="tabpanel"> <div class="expressive-code"><link rel="stylesheet" href="/site-generator-beta/_astro/ec.j8ofn.css"><script type="module" src="/site-generator-beta/_astro/ec.8zarh.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="protobuf"><code><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">rpc AddAuthor(AddAuthorRequest) returns (Book) {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">option</span><span style="--0:#D6DEEB;--1:#403F53"> (google.api.http) </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">post</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#9B504E">"/v1/{book=publishers/*/books/*}:addAuthor"</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">body</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#9B504E">"*"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">};</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">}</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">rpc RemoveAuthor(RemoveAuthorRequest) returns (Book) {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">option</span><span style="--0:#D6DEEB;--1:#403F53"> (google.api.http) </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">post</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#9B504E">"/v1/{book=publishers/*/books/*}:removeAuthor"</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">body</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#9B504E">"*"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">};</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">}</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="rpc AddAuthor(AddAuthorRequest) returns (Book) { option (google.api.http) = { post: &#x22;/v1/{book=publishers/*/books/*}:addAuthor&#x22; body: &#x22;*&#x22; }; }rpc RemoveAuthor(RemoveAuthorRequest) returns (Book) { option (google.api.http) = { post: &#x22;/v1/{book=publishers/*/books/*}:removeAuthor&#x22; body: &#x22;*&#x22; }; }"><div></div></button></div></figure></div><ul>
<li>
<p>The data being added or removed <b class="font-extrabold text-yellow-700">should</b> be a primitive (usually a
Expand Down Expand Up @@ -207,7 +207,7 @@ <h3 id="update-strategies">Update strategies</h3>
<aside aria-label="Note" class="starlight-aside starlight-aside--note"> <p class="starlight-aside__title" aria-hidden="true"> <svg aria-hidden="true" class="starlight-aside__icon astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1Zm.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.15 1.15 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21ZM12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20Z"/></svg> Note </p> <section class="starlight-aside__content"> <p>If both of these strategies are too restrictive, consider using a
subresource instead.</p> </section> </aside>
<h4 id="request-structure">Request Structure</h4>
<starlight-tabs class="astro-esqgolmp"> <div class="tablist-wrapper not-content astro-esqgolmp"> <ul role="tablist" class="astro-esqgolmp"> <li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-58" id="tab-58" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Protocol Buffers </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-59" id="tab-59" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> OpenAPI 3.0 </a> </li> </ul> </div> <section id="tab-panel-58" aria-labelledby="tab-58" role="tabpanel"> <div class="expressive-code"><link rel="stylesheet" href="/site-generator-beta/_astro/ec.j8ofn.css"><script type="module" src="/site-generator-beta/_astro/ec.8zarh.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="protobuf"><code><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8D46B4">message</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#FFCB8B;--1:#111111">AddAuthorRequest</span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#5E6578">// The name of the book to add an author to.</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">string</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">book</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">1</span><span style="--0:#D6DEEB;--1:#403F53"> [</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">(google.api.field_behavior) = </span><span style="--0:#82AAFF;--1:#3C63B3">REQUIRED</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">(google.api.resource_reference).type = </span><span style="--0:#ECC48D;--1:#9B504E">"library.googleapis.com/Book"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">];</span></div></div><div class="ec-line"><div class="code">
<starlight-tabs class="astro-esqgolmp"> <div class="tablist-wrapper not-content astro-esqgolmp"> <ul role="tablist" class="astro-esqgolmp"> <li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-58" id="tab-58" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Protocol Buffers </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-59" id="tab-59" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> OpenAPI 3.0 </a> </li> </ul> </div> <section id="tab-panel-58" aria-labelledby="tab-58" role="tabpanel"> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="protobuf"><code><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8D46B4">message</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#FFCB8B;--1:#111111">AddAuthorRequest</span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#5E6578">// The name of the book to add an author to.</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">string</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">book</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">1</span><span style="--0:#D6DEEB;--1:#403F53"> [</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">(google.api.field_behavior) = </span><span style="--0:#82AAFF;--1:#3C63B3">REQUIRED</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">(google.api.resource_reference).type = </span><span style="--0:#ECC48D;--1:#9B504E">"library.googleapis.com/Book"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">];</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#5E6578">// The author to be added.</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">string</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">author</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">2</span><span style="--0:#D6DEEB;--1:#403F53"> [(google.api.field_behavior) = </span><span style="--0:#82AAFF;--1:#3C63B3">REQUIRED</span><span style="--0:#D6DEEB;--1:#403F53">];</span></div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">}</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8D46B4">message</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#FFCB8B;--1:#111111">RemoveAuthorRequest</span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#5E6578">// The name of the book to remove an author from.</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">string</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">book</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">1</span><span style="--0:#D6DEEB;--1:#403F53"> [</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">(google.api.field_behavior) = </span><span style="--0:#82AAFF;--1:#3C63B3">REQUIRED</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">(google.api.resource_reference).type = </span><span style="--0:#ECC48D;--1:#9B504E">"library.googleapis.com/Book"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">];</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#5E6578">// The author to be removed.</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">string</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">author</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">2</span><span style="--0:#D6DEEB;--1:#403F53"> [(google.api.field_behavior) = </span><span style="--0:#82AAFF;--1:#3C63B3">REQUIRED</span><span style="--0:#D6DEEB;--1:#403F53">];</span></div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">}</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="message AddAuthorRequest { // The name of the book to add an author to. string book = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = &#x22;library.googleapis.com/Book&#x22; ]; // The author to be added. string author = 2 [(google.api.field_behavior) = REQUIRED];}message RemoveAuthorRequest { // The name of the book to remove an author from. string book = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = &#x22;library.googleapis.com/Book&#x22; ]; // The author to be removed. string author = 2 [(google.api.field_behavior) = REQUIRED];}"><div></div></button></div></figure></div><ul>
Expand Down
Loading

0 comments on commit 63bfaae

Please sign in to comment.