Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #72 from tubone24/openapi
Browse files Browse the repository at this point in the history
validation test add
  • Loading branch information
tubone24 committed May 1, 2019
2 parents 584ffef + 996b5eb commit 9da24de
Show file tree
Hide file tree
Showing 17 changed files with 553 additions and 56 deletions.
47 changes: 46 additions & 1 deletion doc_src/_static/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ components:
required:
- uploadId
type: object
ErrorResp:
properties:
error:
type: string
errorDate:
format: date
type: string
type: object
FileNotFoundResp:
properties:
errorDate:
format: date
type: string
reason:
type: string
type: object
HealthCheck:
properties:
status:
Expand All @@ -40,6 +56,7 @@ components:
type: array
required:
- contentType
- images
type: object
info:
contact:
Expand Down Expand Up @@ -79,6 +96,12 @@ paths:
schema:
$ref: '#/components/schemas/UploadIdResp'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResp'
description: BadRequest
summary: Base64 encoded Images
/convert/pdf:
post:
Expand All @@ -95,6 +118,18 @@ paths:
schema:
$ref: '#/components/schemas/UploadIdResp'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResp'
description: BadRequest
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/FileNotFoundResp'
description: UploadIdNotFound
summary: Upload Id witch get upload images and ContentType
/convert/pdf/download:
post:
Expand All @@ -112,6 +147,16 @@ paths:
format: binary
type: string
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResp'
description: BadRequest
'404':
description: FileNotFound
content:
application/json:
schema:
$ref: '#/components/schemas/FileNotFoundResp'
description: ResultFileNotFound
summary: Upload Id witch get upload images
107 changes: 95 additions & 12 deletions docs/_modules/ebook_homebrew/rest.html

Large diffs are not rendered by default.

47 changes: 46 additions & 1 deletion docs/_static/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ components:
required:
- uploadId
type: object
ErrorResp:
properties:
error:
type: string
errorDate:
format: date
type: string
type: object
FileNotFoundResp:
properties:
errorDate:
format: date
type: string
reason:
type: string
type: object
HealthCheck:
properties:
status:
Expand All @@ -40,6 +56,7 @@ components:
type: array
required:
- contentType
- images
type: object
info:
contact:
Expand Down Expand Up @@ -79,6 +96,12 @@ paths:
schema:
$ref: '#/components/schemas/UploadIdResp'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResp'
description: BadRequest
summary: Base64 encoded Images
/convert/pdf:
post:
Expand All @@ -95,6 +118,18 @@ paths:
schema:
$ref: '#/components/schemas/UploadIdResp'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResp'
description: BadRequest
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/FileNotFoundResp'
description: UploadIdNotFound
summary: Upload Id witch get upload images and ContentType
/convert/pdf/download:
post:
Expand All @@ -112,6 +147,16 @@ paths:
format: binary
type: string
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResp'
description: BadRequest
'404':
description: FileNotFound
content:
application/json:
schema:
$ref: '#/components/schemas/FileNotFoundResp'
description: ResultFileNotFound
summary: Upload Id witch get upload images
111 changes: 103 additions & 8 deletions docs/ebook_homebrew.html
Original file line number Diff line number Diff line change
Expand Up @@ -544,21 +544,50 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
</dd></dl>

<dl class="class">
<dt id="ebook_homebrew.rest.HealthCheckSchema">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">HealthCheckSchema</code><span class="sig-paren">(</span><em>extra=None</em>, <em>only=None</em>, <em>exclude=()</em>, <em>prefix=''</em>, <em>strict=None</em>, <em>many=False</em>, <em>context=None</em>, <em>load_only=()</em>, <em>dump_only=()</em>, <em>partial=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#HealthCheckSchema"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.HealthCheckSchema" title="Permalink to this definition"></a></dt>
<dt id="ebook_homebrew.rest.ErrorModel">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">ErrorModel</code><span class="sig-paren">(</span><em>error</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#ErrorModel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.ErrorModel" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Error Model</p>
</dd></dl>

<dl class="class">
<dt id="ebook_homebrew.rest.ErrorRespSchema">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">ErrorRespSchema</code><span class="sig-paren">(</span><em>extra=None</em>, <em>only=None</em>, <em>exclude=()</em>, <em>prefix=''</em>, <em>strict=None</em>, <em>many=False</em>, <em>context=None</em>, <em>load_only=()</em>, <em>dump_only=()</em>, <em>partial=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#ErrorRespSchema"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.ErrorRespSchema" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">marshmallow.schema.Schema</span></code></p>
<dl class="attribute">
<dt id="ebook_homebrew.rest.HealthCheckSchema.opts">
<code class="descname">opts</code><em class="property"> = &lt;marshmallow.schema.SchemaOpts object&gt;</em><a class="headerlink" href="#ebook_homebrew.rest.HealthCheckSchema.opts" title="Permalink to this definition"></a></dt>
<dt id="ebook_homebrew.rest.ErrorRespSchema.opts">
<code class="descname">opts</code><em class="property"> = &lt;marshmallow.schema.SchemaOpts object&gt;</em><a class="headerlink" href="#ebook_homebrew.rest.ErrorRespSchema.opts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ebook_homebrew.rest.Upload">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">Upload</code><span class="sig-paren">(</span><em>upload_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#Upload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.Upload" title="Permalink to this definition"></a></dt>
<dt id="ebook_homebrew.rest.FileNotFoundModel">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">FileNotFoundModel</code><span class="sig-paren">(</span><em>reason</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#FileNotFoundModel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.FileNotFoundModel" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Upload_id Model</p>
<p>FileNotFound Model</p>
</dd></dl>

<dl class="class">
<dt id="ebook_homebrew.rest.FileNotFoundRespSchema">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">FileNotFoundRespSchema</code><span class="sig-paren">(</span><em>extra=None</em>, <em>only=None</em>, <em>exclude=()</em>, <em>prefix=''</em>, <em>strict=None</em>, <em>many=False</em>, <em>context=None</em>, <em>load_only=()</em>, <em>dump_only=()</em>, <em>partial=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#FileNotFoundRespSchema"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.FileNotFoundRespSchema" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">marshmallow.schema.Schema</span></code></p>
<dl class="attribute">
<dt id="ebook_homebrew.rest.FileNotFoundRespSchema.opts">
<code class="descname">opts</code><em class="property"> = &lt;marshmallow.schema.SchemaOpts object&gt;</em><a class="headerlink" href="#ebook_homebrew.rest.FileNotFoundRespSchema.opts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ebook_homebrew.rest.HealthCheckSchema">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">HealthCheckSchema</code><span class="sig-paren">(</span><em>extra=None</em>, <em>only=None</em>, <em>exclude=()</em>, <em>prefix=''</em>, <em>strict=None</em>, <em>many=False</em>, <em>context=None</em>, <em>load_only=()</em>, <em>dump_only=()</em>, <em>partial=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#HealthCheckSchema"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.HealthCheckSchema" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">marshmallow.schema.Schema</span></code></p>
<dl class="attribute">
<dt id="ebook_homebrew.rest.HealthCheckSchema.opts">
<code class="descname">opts</code><em class="property"> = &lt;marshmallow.schema.SchemaOpts object&gt;</em><a class="headerlink" href="#ebook_homebrew.rest.HealthCheckSchema.opts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
Expand All @@ -583,6 +612,13 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

</dd></dl>

<dl class="class">
<dt id="ebook_homebrew.rest.UploadModel">
<em class="property">class </em><code class="descclassname">ebook_homebrew.rest.</code><code class="descname">UploadModel</code><span class="sig-paren">(</span><em>upload_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#UploadModel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.UploadModel" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Upload_id Model</p>
</dd></dl>

<dl class="function">
<dt id="ebook_homebrew.rest.convert_content_type_to_extension">
<code class="descclassname">ebook_homebrew.rest.</code><code class="descname">convert_content_type_to_extension</code><span class="sig-paren">(</span><em>content_type</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/ebook_homebrew/rest.html#convert_content_type_to_extension"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ebook_homebrew.rest.convert_content_type_to_extension" title="Permalink to this definition"></a></dt>
Expand Down Expand Up @@ -634,6 +670,31 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
</dl>
</div></blockquote>
</dd>
<dt>“400”:</dt><dd><p>description: BadRequest
content:</p>
<blockquote>
<div><dl class="simple">
<dt>application/json:</dt><dd><dl class="simple">
<dt>schema:</dt><dd><p>$ref: “#/components/schemas/ErrorResp”</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
<dt>“404”:</dt><dd><p>description: UploadIdNotFound
content:</p>
<blockquote>
<div><p>application/json:
application/json:</p>
<blockquote>
<div><dl class="simple">
<dt>schema:</dt><dd><p>$ref: “#/components/schemas/FileNotFoundResp”</p>
</dd>
</dl>
</div></blockquote>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
Expand Down Expand Up @@ -675,7 +736,29 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
</dl>
</div></blockquote>
</dd>
<dt>“404”:</dt><dd><p>description: FileNotFound</p>
<dt>“400”:</dt><dd><p>description: BadRequest
content:</p>
<blockquote>
<div><dl class="simple">
<dt>application/json:</dt><dd><dl class="simple">
<dt>schema:</dt><dd><p>$ref: “#/components/schemas/ErrorResp”</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
<dt>“404”:</dt><dd><p>description: ResultFileNotFound
content:</p>
<blockquote>
<div><dl class="simple">
<dt>application/json:</dt><dd><dl class="simple">
<dt>schema:</dt><dd><p>$ref: “#/components/schemas/FileNotFoundResp”</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -745,6 +828,18 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
</dl>
</div></blockquote>
</dd>
<dt>“400”:</dt><dd><p>description: BadRequest
content:</p>
<blockquote>
<div><dl class="simple">
<dt>application/json:</dt><dd><dl class="simple">
<dt>schema:</dt><dd><p>$ref: “#/components/schemas/ErrorResp”</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
Expand Down
26 changes: 20 additions & 6 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,21 @@ <h2 id="E">E</h2>
</li>
<li><a href="ebook_homebrew.html#module-ebook_homebrew.helper">ebook_homebrew.helper (module)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ebook_homebrew.html#module-ebook_homebrew.rename">ebook_homebrew.rename (module)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ebook_homebrew.html#module-ebook_homebrew.rest">ebook_homebrew.rest (module)</a>
</li>
<li><a href="ebook_homebrew.utils.html#module-ebook_homebrew.utils">ebook_homebrew.utils (module)</a>
</li>
<li><a href="ebook_homebrew.utils.html#module-ebook_homebrew.utils.logging">ebook_homebrew.utils.logging (module)</a>
</li>
<li><a href="ebook_homebrew.utils.html#ebook_homebrew.utils.logging.AppLog.error">error() (ebook_homebrew.utils.logging.AppLog method)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.ErrorModel">ErrorModel (class in ebook_homebrew.rest)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.ErrorRespSchema">ErrorRespSchema (class in ebook_homebrew.rest)</a>
</li>
<li><a href="ebook_homebrew.utils.html#ebook_homebrew.utils.logging.AppLog.exception">exception() (ebook_homebrew.utils.logging.AppLog method)</a>
</li>
Expand All @@ -282,6 +286,12 @@ <h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ebook_homebrew.html#ebook_homebrew.rename.ChangeFilename.filename_to_digit_number">filename_to_digit_number() (ebook_homebrew.rename.ChangeFilename method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.FileNotFoundModel">FileNotFoundModel (class in ebook_homebrew.rest)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.FileNotFoundRespSchema">FileNotFoundRespSchema (class in ebook_homebrew.rest)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -367,6 +377,10 @@ <h2 id="O">O</h2>

<ul>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.DownloadReqSchema.opts">(ebook_homebrew.rest.DownloadReqSchema attribute)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.ErrorRespSchema.opts">(ebook_homebrew.rest.ErrorRespSchema attribute)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.FileNotFoundRespSchema.opts">(ebook_homebrew.rest.FileNotFoundRespSchema attribute)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.HealthCheckSchema.opts">(ebook_homebrew.rest.HealthCheckSchema attribute)</a>
</li>
Expand Down Expand Up @@ -409,15 +423,15 @@ <h2 id="T">T</h2>
<h2 id="U">U</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.Upload">Upload (class in ebook_homebrew.rest)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.upload_image_file">upload_image_file() (in module ebook_homebrew.rest)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.UploadIdRespSchema">UploadIdRespSchema (class in ebook_homebrew.rest)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.UploadImagesReqSchema">UploadImagesReqSchema (class in ebook_homebrew.rest)</a>
</li>
<li><a href="ebook_homebrew.html#ebook_homebrew.rest.UploadModel">UploadModel (class in ebook_homebrew.rest)</a>
</li>
</ul></td>
</tr></table>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.

0 comments on commit 9da24de

Please sign in to comment.