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

@@ -645,13 +645,13 @@ No decorator-driven routing or implicit framework behavior is used.</p>
<hr />
<h4 id="openapi_first.templates.model_app--scaffolding-via-cli">Scaffolding via CLI</h4>
<p>Create a new model-based CRUD example 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 model_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 model_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 model_app my-model-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 model_app my-model-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>
@@ -691,7 +691,7 @@ construct a strict, operationId-driven HTTP client.</p>
<span class="normal">29</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)
# List items
@@ -699,23 +699,23 @@ response = client.list_items()
# Get item by ID
response = client.get_item(
path_params={&quot;item_id&quot;: 1}
path_params={"item_id": 1}
)
# Create item
response = client.create_item(
body={&quot;name&quot;: &quot;Orange&quot;, &quot;price&quot;: 0.8}
body={"name": "Orange", "price": 0.8}
)
# Update item
response = client.update_item(
path_params={&quot;item_id&quot;: 1},
body={&quot;name&quot;: &quot;Green Apple&quot;, &quot;price&quot;: 0.6},
path_params={"item_id": 1},
body={"name": "Green Apple", "price": 0.6},
)
# Delete item
response = client.delete_item(
path_params={&quot;item_id&quot;: 1}
path_params={"item_id": 1}
)
</code></pre></div></td></tr></table></div>
<p>Client guarantees: