Correct API documentation for search (#878)
This commit is contained in:
parent
469b29087b
commit
fb72c19384
2 changed files with 200 additions and 174 deletions
|
@ -135,9 +135,6 @@
|
|||
<li>
|
||||
<a href="#operation--videos-privacies-get"> GET /videos/privacies </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#operation--videos-search-get"> GET /videos/search </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#operation--videos--id--put"> PUT /videos/{id} </a>
|
||||
</li>
|
||||
|
@ -237,6 +234,14 @@
|
|||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<a href="#tag-Search">Search</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#operation--search-videos-get"> GET /search/videos </a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<h5>Schema Definitions</h5>
|
||||
<a href="#definition-VideoConstantNumber"> VideoConstantNumber </a>
|
||||
<a href="#definition-VideoConstantString"> VideoConstantString </a>
|
||||
|
@ -3217,158 +3222,6 @@
|
|||
<!-- <div class="hljs"> --><pre><code class="hljs lang-json">[
|
||||
<span class="hljs-string">"string"</span>
|
||||
]
|
||||
</code></pre>
|
||||
<!-- </div> -->
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="operation--videos-search-get" class="operation panel" data-traverse-target="operation--videos-search-get">
|
||||
<!-- <section class="operation-tags row"> -->
|
||||
<!-- <div class="doc-copy"> -->
|
||||
<div class="operation-tags">
|
||||
<a class="label" href="#tag-Video">Video</a>
|
||||
<!---->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </section> -->
|
||||
<h2 class="operation-title">
|
||||
<span class="operation-name">
|
||||
<span class="operation-name">GET</span>
|
||||
<span class="operation-path">/videos/search</span>
|
||||
</span>
|
||||
</h2>
|
||||
<div class="doc-row">
|
||||
<div class="doc-copy">
|
||||
<section class="swagger-request-params">
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">start:
|
||||
<span class="prop-type">
|
||||
<span class="json-property-type">number</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="prop-subtitle"> in query </div>
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>Offset</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">count:
|
||||
<span class="prop-type">
|
||||
<span class="json-property-type">number</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="prop-subtitle"> in query </div>
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>Number of items</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">sort:
|
||||
<span class="prop-type">
|
||||
<span class="json-property-type">string</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="prop-subtitle"> in query </div>
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>Sort column (-createdAt for example)</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="doc-examples"></div>
|
||||
</div>
|
||||
<div class="doc-row">
|
||||
<div class="doc-copy">
|
||||
<section class="swagger-responses">
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">200 OK</div>
|
||||
<div class="prop-ref">
|
||||
<span class="json-schema-ref-array">
|
||||
<a class="json-schema-ref" href="#/definitions/Video">Video</a>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href=""></a></span> -->
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>successful operation</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="prop-row prop-inner">
|
||||
<div class="prop-name">type</div>
|
||||
<div class="prop-value">
|
||||
<span class="json-property-type">
|
||||
<span class="json-schema-ref-array">
|
||||
<a class="json-schema-ref" href="#/definitions/Video">Video</a>
|
||||
</span>
|
||||
</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="doc-examples">
|
||||
<h5>Response Content-Types:
|
||||
<span>application/json</span>
|
||||
</h5>
|
||||
<section>
|
||||
<h5>Response Example
|
||||
<span>(200 OK)</span>
|
||||
</h5>
|
||||
<!-- <div class="hljs"> --><pre><code class="hljs lang-json">[
|
||||
{
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"uuid"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"createdAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"publishedAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"updatedAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"category"</span>: {
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"label"</span>: <span class="hljs-string">"string"</span>
|
||||
},
|
||||
<span class="hljs-attr">"licence"</span>: {
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"label"</span>: <span class="hljs-string">"string"</span>
|
||||
},
|
||||
<span class="hljs-attr">"language"</span>: {
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"label"</span>: <span class="hljs-string">"string"</span>
|
||||
},
|
||||
<span class="hljs-attr">"privacy"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"duration"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"isLocal"</span>: <span class="hljs-string">"boolean"</span>,
|
||||
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"thumbnailPath"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"previewPath"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"embedPath"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"views"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"likes"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"dislikes"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"nsfw"</span>: <span class="hljs-string">"boolean"</span>,
|
||||
<span class="hljs-attr">"account"</span>: {
|
||||
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"displayName"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"url"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"host"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"avatar"</span>: {
|
||||
<span class="hljs-attr">"path"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"createdAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"updatedAt"</span>: <span class="hljs-string">"string"</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
</code></pre>
|
||||
<!-- </div> -->
|
||||
</section>
|
||||
|
@ -6328,6 +6181,174 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h1 id="tag-Search" class="swagger-summary-tag" data-traverse-target="tag-Search">Search</h1>
|
||||
<div id="operation--search-videos-get" class="operation panel" data-traverse-target="operation--search-videos-get">
|
||||
<!-- <section class="operation-tags row"> -->
|
||||
<!-- <div class="doc-copy"> -->
|
||||
<div class="operation-tags">
|
||||
<a class="label" href="#tag-Search">Search</a>
|
||||
<!---->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- </section> -->
|
||||
<h2 class="operation-title">
|
||||
<span class="operation-name">
|
||||
<span class="operation-name">GET</span>
|
||||
<span class="operation-path">/search/videos</span>
|
||||
</span>
|
||||
</h2>
|
||||
<div class="doc-row">
|
||||
<div class="doc-copy">
|
||||
<section class="swagger-request-params">
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">start:
|
||||
<span class="prop-type">
|
||||
<span class="json-property-type">number</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="prop-subtitle"> in query </div>
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>Offset</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">count:
|
||||
<span class="prop-type">
|
||||
<span class="json-property-type">number</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="prop-subtitle"> in query </div>
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>Number of items</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">sort:
|
||||
<span class="prop-type">
|
||||
<span class="json-property-type">string</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="prop-subtitle"> in query </div>
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>Sort column (-createdAt for example)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">query:
|
||||
<span class="prop-type">
|
||||
<span class="json-property-type">string</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</span>
|
||||
</div>
|
||||
<span class="json-property-required"></span>
|
||||
<div class="prop-subtitle"> in query </div>
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>String to search</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="doc-examples"></div>
|
||||
</div>
|
||||
<div class="doc-row">
|
||||
<div class="doc-copy">
|
||||
<section class="swagger-responses">
|
||||
<div class="prop-row prop-group">
|
||||
<div class="prop-name">
|
||||
<div class="prop-title">200 OK</div>
|
||||
<div class="prop-ref">
|
||||
<span class="json-schema-ref-array">
|
||||
<a class="json-schema-ref" href="#/definitions/Video">Video</a>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href=""></a></span> -->
|
||||
</div>
|
||||
<div class="prop-value">
|
||||
<p>successful operation</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="prop-row prop-inner">
|
||||
<div class="prop-name">type</div>
|
||||
<div class="prop-value">
|
||||
<span class="json-property-type">
|
||||
<span class="json-schema-ref-array">
|
||||
<a class="json-schema-ref" href="#/definitions/Video">Video</a>
|
||||
</span>
|
||||
</span>
|
||||
<span class="json-property-range" title="Value limits"></span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="doc-examples">
|
||||
<h5>Response Content-Types:
|
||||
<span>application/json</span>
|
||||
</h5>
|
||||
<section>
|
||||
<h5>Response Example
|
||||
<span>(200 OK)</span>
|
||||
</h5>
|
||||
<!-- <div class="hljs"> --><pre><code class="hljs lang-json">[
|
||||
{
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"uuid"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"createdAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"publishedAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"updatedAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"category"</span>: {
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"label"</span>: <span class="hljs-string">"string"</span>
|
||||
},
|
||||
<span class="hljs-attr">"licence"</span>: {
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"label"</span>: <span class="hljs-string">"string"</span>
|
||||
},
|
||||
<span class="hljs-attr">"language"</span>: {
|
||||
<span class="hljs-attr">"id"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"label"</span>: <span class="hljs-string">"string"</span>
|
||||
},
|
||||
<span class="hljs-attr">"privacy"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"duration"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"isLocal"</span>: <span class="hljs-string">"boolean"</span>,
|
||||
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"thumbnailPath"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"previewPath"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"embedPath"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"views"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"likes"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"dislikes"</span>: <span class="hljs-string">"number"</span>,
|
||||
<span class="hljs-attr">"nsfw"</span>: <span class="hljs-string">"boolean"</span>,
|
||||
<span class="hljs-attr">"account"</span>: {
|
||||
<span class="hljs-attr">"name"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"displayName"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"url"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"host"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"avatar"</span>: {
|
||||
<span class="hljs-attr">"path"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"createdAt"</span>: <span class="hljs-string">"string"</span>,
|
||||
<span class="hljs-attr">"updatedAt"</span>: <span class="hljs-string">"string"</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
</code></pre>
|
||||
<!-- </div> -->
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Schema Definitions</h1>
|
||||
<div id="definition-VideoConstantNumber" class="definition panel" data-traverse-target="definition-VideoConstantNumber">
|
||||
<h2 class="panel-title">
|
||||
|
|
|
@ -512,25 +512,6 @@ paths:
|
|||
type: array
|
||||
items:
|
||||
type: string
|
||||
/videos/search:
|
||||
get:
|
||||
tags:
|
||||
- Video
|
||||
consumes:
|
||||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- $ref: "commons.yaml#/parameters/start"
|
||||
- $ref: "commons.yaml#/parameters/count"
|
||||
- $ref: "commons.yaml#/parameters/sort"
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Video'
|
||||
"/videos/{id}":
|
||||
put:
|
||||
security:
|
||||
|
@ -957,6 +938,30 @@ paths:
|
|||
responses:
|
||||
'204':
|
||||
$ref: "commons.yaml#/responses/emptySuccess"
|
||||
/search/videos:
|
||||
get:
|
||||
tags:
|
||||
- Search
|
||||
consumes:
|
||||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
parameters:
|
||||
- $ref: "commons.yaml#/parameters/start"
|
||||
- $ref: "commons.yaml#/parameters/count"
|
||||
- $ref: "commons.yaml#/parameters/sort"
|
||||
- name: query
|
||||
in: query
|
||||
required: true
|
||||
type: string
|
||||
description: 'String to search'
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Video'
|
||||
definitions:
|
||||
VideoConstantNumber:
|
||||
properties:
|
||||
|
|
Loading…
Reference in a new issue