docs: collect openapi-first wiki and refresh openapi-first lib docs; regenerate homepage

This commit is contained in:
2026-09-15 22:36:51 +05:30
parent 58544c4524
commit a51082fe77
83 changed files with 20049 additions and 535 deletions

View File

@@ -632,13 +632,13 @@ services via the <code>openapi-first</code> CLI. It is not part of the
<h4 id="openapi_first.templates.health_app--scaffolding-via-cli">Scaffolding via CLI</h4>
<p>Create a new OpenAPI-first health check service using the bundled
template:</p>
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>openapi-first health_app
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>openapi-first scaffold health_app
</code></pre></div></td></tr></table></div>
<p>Create the service in a custom directory:</p>
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>openapi-first health_app my-health-service
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>openapi-first scaffold health_app my-health-service
</code></pre></div></td></tr></table></div>
<p>List all available application templates:</p>
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>openapi-first --list
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><code>openapi-first scaffold --list
</code></pre></div></td></tr></table></div>
<p>The CLI copies template files verbatim into the target directory.
No code is generated or modified beyond the copied scaffold.</p>
@@ -659,13 +659,13 @@ construct a strict, operationId-driven HTTP client.</p>
<span class="normal">10</span></pre></div></td><td class="code"><div><pre><span></span><code>from openapi_first.loader import load_openapi
from openapi_first.client import OpenAPIClient
spec = load_openapi(&quot;openapi.yaml&quot;)
spec = load_openapi("openapi.yaml")
client = OpenAPIClient(spec)
response = client.get_health()
assert response.status_code == 200
assert response.json() == {&quot;status&quot;: &quot;ok&quot;}
assert response.json() == {"status": "ok"}
</code></pre></div></td></tr></table></div>
<p>Client guarantees:
- One callable per OpenAPI <code>operationId</code>

View File

@@ -665,7 +665,7 @@ OpenAPI specification.</p>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_health</span><span class="p">()</span>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_health</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">