This commit is contained in:
@@ -86,7 +86,9 @@
|
||||
|
||||
|
||||
|
||||
<header class="md-header" data-md-component="header">
|
||||
|
||||
|
||||
<header class="md-header md-header--shadow" data-md-component="header">
|
||||
<nav class="md-header__inner md-grid" aria-label="Header">
|
||||
<a href=".." title="openapi_first" class="md-header__button md-logo" aria-label="openapi_first" data-md-component="logo">
|
||||
|
||||
@@ -151,12 +153,19 @@
|
||||
</label>
|
||||
<nav class="md-search__options" aria-label="Search">
|
||||
|
||||
<a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
|
||||
</a>
|
||||
|
||||
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="md-search__suggest" data-md-component="search-suggest"></div>
|
||||
|
||||
</form>
|
||||
<div class="md-search__output">
|
||||
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
|
||||
@@ -182,96 +191,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
|
||||
<div class="md-grid">
|
||||
<ul class="md-tabs__list">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-tabs__item">
|
||||
<a href=".." class="md-tabs__link">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Home
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-tabs__item md-tabs__item--active">
|
||||
<a href="../app/" class="md-tabs__link">
|
||||
|
||||
|
||||
|
||||
Application Bootstrap
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-tabs__item">
|
||||
<a href="../loader/" class="md-tabs__link">
|
||||
|
||||
|
||||
|
||||
Core Utilities
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-tabs__item">
|
||||
<a href="../client/" class="md-tabs__link">
|
||||
|
||||
|
||||
|
||||
OpenAPI Client
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<main class="md-main" data-md-component="main">
|
||||
@@ -285,10 +204,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
|
||||
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
||||
<label class="md-nav__title" for="__drawer">
|
||||
<a href=".." title="openapi_first" class="md-nav__button md-logo" aria-label="openapi_first" data-md-component="logo">
|
||||
|
||||
@@ -333,13 +250,18 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
|
||||
@@ -459,47 +381,33 @@
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--openapi_firstbinder" class="md-nav__link">
|
||||
<a href="#openapi_first.binder--summary" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
openapi_first.binder
|
||||
Summary
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="openapi_first.binder">
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder-classes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Classes
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder-functions" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Functions
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Functions">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--core-responsibility" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Core responsibility
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--design-constraints" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Design constraints
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--this-module-intentionally-does-not" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
This module intentionally does NOT:
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
@@ -507,34 +415,6 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="bind_routes">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes--parameters" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Parameters
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes--raises" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Raises
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes--behavior-guarantees" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Behavior guarantees
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -571,13 +451,21 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--nested">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||||
|
||||
|
||||
|
||||
@@ -586,7 +474,7 @@
|
||||
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_3" >
|
||||
|
||||
|
||||
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
|
||||
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
|
||||
|
||||
|
||||
|
||||
@@ -667,13 +555,19 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--nested">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||||
|
||||
|
||||
|
||||
@@ -682,7 +576,7 @@
|
||||
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_4" >
|
||||
|
||||
|
||||
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
|
||||
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="">
|
||||
|
||||
|
||||
|
||||
@@ -769,47 +663,33 @@
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--openapi_firstbinder" class="md-nav__link">
|
||||
<a href="#openapi_first.binder--summary" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
openapi_first.binder
|
||||
Summary
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="openapi_first.binder">
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder-classes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Classes
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder-functions" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Functions
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Functions">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--core-responsibility" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Core responsibility
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--design-constraints" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Design constraints
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder--this-module-intentionally-does-not" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
This module intentionally does NOT:
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
@@ -817,34 +697,6 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="bind_routes">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes--parameters" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Parameters
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes--raises" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Raises
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#openapi_first.binder.bind_routes--behavior-guarantees" class="md-nav__link">
|
||||
<span class="md-ellipsis">
|
||||
Behavior guarantees
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -881,43 +733,48 @@
|
||||
|
||||
|
||||
<h2 id="openapi_first.binder" class="doc doc-heading">
|
||||
<span class="doc doc-object-name doc-module-name">openapi_first.binder</span>
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-module"></code> <span class="doc doc-object-name doc-module-name">openapi_first.binder</span>
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
<div class="doc doc-contents first">
|
||||
|
||||
<h3 id="openapi_first.binder--openapi_firstbinder">openapi_first.binder</h3>
|
||||
<p>OpenAPI-driven route binding for FastAPI.</p>
|
||||
<p>OpenAPI-driven route binding for FastAPI.</p>
|
||||
<hr />
|
||||
<h4 id="openapi_first.binder--summary">Summary</h4>
|
||||
<p>This module is responsible for translating an OpenAPI 3.x specification
|
||||
into concrete FastAPI routes. It enforces a strict one-to-one mapping
|
||||
between OpenAPI operations and Python handler functions using operationId.</p>
|
||||
<h4 id="openapi_first.binder--core-responsibility">Core responsibility</h4>
|
||||
<ul>
|
||||
<li>Read path + method definitions from an OpenAPI specification</li>
|
||||
<li>Resolve each operationId to a Python callable</li>
|
||||
<li>Register routes with FastAPI using APIRoute</li>
|
||||
<li>Fail fast when contract violations are detected</li>
|
||||
</ul>
|
||||
<h4 id="openapi_first.binder--design-constraints">Design constraints</h4>
|
||||
<ul>
|
||||
<li>All routes MUST be declared in the OpenAPI specification.</li>
|
||||
<li>All OpenAPI operations MUST define an operationId.</li>
|
||||
<li>Every operationId MUST resolve to a handler function.</li>
|
||||
<li>Handlers are plain Python callables (no decorators required).</li>
|
||||
<li>No implicit route creation or inference is allowed.</li>
|
||||
</ul>
|
||||
<h4 id="openapi_first.binder--this-module-intentionally-does-not">This module intentionally does NOT:</h4>
|
||||
<ul>
|
||||
<li>Perform request or response validation</li>
|
||||
<li>Generate Pydantic models</li>
|
||||
<li>Modify FastAPI dependency injection</li>
|
||||
<li>Interpret OpenAPI semantics beyond routing metadata</li>
|
||||
</ul>
|
||||
<p>Those concerns belong to other layers or tooling.</p>
|
||||
|
||||
|
||||
<details class="notes" open>
|
||||
<summary>Notes</summary>
|
||||
<p><strong>Core Responsibility:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code>- Read path + method definitions from an OpenAPI specification
|
||||
- Resolve each operationId to a Python callable
|
||||
- Register routes with FastAPI using APIRoute
|
||||
- Fail fast when contract violations are detected
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Design Constraints:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span>
|
||||
<span class="normal">3</span>
|
||||
<span class="normal">4</span>
|
||||
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><code>- All routes MUST be declared in the OpenAPI specification
|
||||
- All OpenAPI operations MUST define an operationId
|
||||
- Every operationId MUST resolve to a handler function
|
||||
- Handlers are plain Python callables (no decorators required)
|
||||
- No implicit route creation or inference is allowed
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Constraints:</strong></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>- This module intentionally does NOT: Perform request or response validation, generate Pydantic models, modify FastAPI dependency injection, or interpret OpenAPI semantics beyond routing metadata.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
|
||||
|
||||
<div class="doc doc-children">
|
||||
|
||||
@@ -926,51 +783,116 @@ between OpenAPI operations and Python handler functions using operationId.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="openapi_first.binder-classes">Classes</h3>
|
||||
<h3 id="openapi_first.binder-functions">Functions</h3>
|
||||
|
||||
<div class="doc doc-object doc-function">
|
||||
|
||||
|
||||
<h3 id="openapi_first.binder.bind_routes" class="doc doc-heading">
|
||||
<span class="doc doc-object-name doc-function-name">bind_routes</span>
|
||||
<h4 id="openapi_first.binder.bind_routes" class="doc doc-heading">
|
||||
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">bind_routes</span>
|
||||
|
||||
|
||||
</h3>
|
||||
<div class="doc-signature highlight"><pre><span></span><code><span class="nf">bind_routes</span><span class="p">(</span><span class="n">app</span><span class="p">:</span> <span class="n">FastAPI</span><span class="p">,</span> <span class="n">spec</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">],</span> <span class="n">routes_module</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span>
|
||||
</code></pre></div>
|
||||
</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">bind_routes</span><span class="p">(</span><span class="n">app</span><span class="p">:</span> <span class="n">FastAPI</span><span class="p">,</span> <span class="n">spec</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">],</span> <span class="n">routes_module</span><span class="p">:</span> <span class="n">Any</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span>
|
||||
</span></code></pre></div></td></tr></table></div>
|
||||
|
||||
<div class="doc doc-contents ">
|
||||
|
||||
<p>Bind OpenAPI operations to FastAPI routes.</p>
|
||||
<p>Iterates through the OpenAPI specification paths and methods,
|
||||
resolves each operationId to a handler function, and registers
|
||||
a corresponding APIRoute on the FastAPI application.</p>
|
||||
<h5 id="openapi_first.binder.bind_routes--parameters">Parameters</h5>
|
||||
<p>app : fastapi.FastAPI
|
||||
The FastAPI application instance to which routes will be added.</p>
|
||||
|
||||
|
||||
<details class="spec-" open>
|
||||
<summary>dict</summary>
|
||||
<p>Parsed OpenAPI 3.x specification dictionary.</p>
|
||||
<p><span class="doc-section-title">Parameters:</span></p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="doc-section-item">
|
||||
<td><code>app</code></td>
|
||||
<td>
|
||||
<code><span title="fastapi.FastAPI">FastAPI</span></code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>The FastAPI application instance to which routes will be added.</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<em>required</em>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="doc-section-item">
|
||||
<td><code>spec</code></td>
|
||||
<td>
|
||||
<code>dict</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>Parsed OpenAPI 3.x specification dictionary.</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<em>required</em>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="doc-section-item">
|
||||
<td><code>routes_module</code></td>
|
||||
<td>
|
||||
<code>module</code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>Python module containing handler functions. Each handler's name MUST exactly match an OpenAPI operationId.</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<em>required</em>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<p><span class="doc-section-title">Raises:</span></p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="doc-section-item">
|
||||
<td>
|
||||
<code><a class="autorefs autorefs-internal" title="openapi_first.errors.MissingOperationHandler" href="../openapi_first/errors/#openapi_first.errors.MissingOperationHandler">MissingOperationHandler</a></code>
|
||||
</td>
|
||||
<td>
|
||||
<div class="doc-md-description">
|
||||
<p>If an operationId is missing from the spec or if no corresponding handler function exists in the routes module.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<details class="notes" open>
|
||||
<summary>Notes</summary>
|
||||
<p><strong>Responsibilities:</strong></p>
|
||||
<div class="language-text highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
|
||||
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><code>- Iterates through the OpenAPI specification paths and methods
|
||||
- Resolves each operationId to a handler function, and registers a corresponding APIRoute on the FastAPI application
|
||||
</code></pre></div></td></tr></table></div>
|
||||
<p><strong>Guarantees:</strong></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>- Route registration is deterministic and spec-driven. No route decorators are required or supported. Handler resolution errors surface at application startup.
|
||||
</code></pre></div></td></tr></table></div>
|
||||
</details>
|
||||
|
||||
<details class="routes_module-" open>
|
||||
<summary>module</summary>
|
||||
<p>Python module containing handler functions. Each handler's
|
||||
name MUST exactly match an OpenAPI operationId.</p>
|
||||
</details> <h5 id="openapi_first.binder.bind_routes--raises">Raises</h5>
|
||||
<p>MissingOperationHandler
|
||||
If an operationId is missing from the spec or if no corresponding
|
||||
handler function exists in the routes module.</p>
|
||||
<h5 id="openapi_first.binder.bind_routes--behavior-guarantees">Behavior guarantees</h5>
|
||||
<ul>
|
||||
<li>Route registration is deterministic and spec-driven.</li>
|
||||
<li>No route decorators are required or supported.</li>
|
||||
<li>Handler resolution errors surface at application startup.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -999,6 +921,8 @@ name MUST exactly match an OpenAPI operationId.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
|
||||
|
||||
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
||||
</div>
|
||||
|
||||
@@ -1036,7 +960,7 @@ name MUST exactly match an OpenAPI operationId.</p>
|
||||
|
||||
|
||||
|
||||
<script id="__config" type="application/json">{"base": "..", "features": ["navigation.tabs", "navigation.expand", "navigation.top", "navigation.instant", "content.code.copy", "content.code.annotate"], "search": "../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
|
||||
<script id="__config" type="application/json">{"base": "..", "features": ["navigation.sections", "navigation.expand", "navigation.top", "navigation.instant", "navigation.tracking", "navigation.indexes", "content.code.copy", "content.code.annotate", "content.tabs.link", "content.action.edit", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
|
||||
|
||||
|
||||
<script src="../assets/javascripts/bundle.f55a23d4.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user