From fb72c19384192d57252e7cb73cdcf8d0876f37a0 Mon Sep 17 00:00:00 2001 From: David Libeau Date: Sat, 28 Jul 2018 14:38:49 -0400 Subject: Correct API documentation for search (#878) --- support/doc/api/html/index.html | 331 +++++++++++++++++++++------------------- support/doc/api/openapi.yaml | 43 +++--- 2 files changed, 200 insertions(+), 174 deletions(-) (limited to 'support/doc/api') diff --git a/support/doc/api/html/index.html b/support/doc/api/html/index.html index bf9b6a17b..c65e8ea6c 100644 --- a/support/doc/api/html/index.html +++ b/support/doc/api/html/index.html @@ -135,9 +135,6 @@
  • GET /videos/privacies
  • -
  • - GET /videos/search -
  • PUT /videos/{id}
  • @@ -237,6 +234,14 @@ +
    + Search + +
    Schema Definitions
    VideoConstantNumber VideoConstantString @@ -3217,158 +3222,6 @@
    [
       "string"
     ]
    -
    - - - - - -
    - - -
    - Video - -
    - - -

    - - GET - /videos/search - -

    -
    -
    -
    -
    -
    -
    start: - - number - - -
    -
    in query
    -
    -
    -

    Offset

    -
    -
    -
    -
    -
    count: - - number - - -
    -
    in query
    -
    -
    -

    Number of items

    -
    -
    -
    -
    -
    sort: - - string - - -
    -
    in query
    -
    -
    -

    Sort column (-createdAt for example)

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    200 OK
    -
    - - Video - -
    - -
    -
    -

    successful operation

    -
    -
    -
    -
    type
    -
    - - - Video - - - -
    -
    -
    -
    -
    -
    Response Content-Types: - application/json -
    -
    -
    Response Example - (200 OK) -
    -
    [
    -  {
    -    "id": "number",
    -    "uuid": "string",
    -    "createdAt": "string",
    -    "publishedAt": "string",
    -    "updatedAt": "string",
    -    "category": {
    -      "id": "number",
    -      "label": "string"
    -    },
    -    "licence": {
    -      "id": "number",
    -      "label": "string"
    -    },
    -    "language": {
    -      "id": "string",
    -      "label": "string"
    -    },
    -    "privacy": "string",
    -    "description": "string",
    -    "duration": "number",
    -    "isLocal": "boolean",
    -    "name": "string",
    -    "thumbnailPath": "string",
    -    "previewPath": "string",
    -    "embedPath": "string",
    -    "views": "number",
    -    "likes": "number",
    -    "dislikes": "number",
    -    "nsfw": "boolean",
    -    "account": {
    -      "name": "string",
    -      "displayName": "string",
    -      "url": "string",
    -      "host": "string",
    -      "avatar": {
    -        "path": "string",
    -        "createdAt": "string",
    -        "updatedAt": "string"
    -      }
    -    }
    -  }
    -]
     
    @@ -6328,6 +6181,174 @@
    +

    Search

    +
    + + +
    + Search + +
    + + +

    + + GET + /search/videos + +

    +
    +
    +
    +
    +
    +
    start: + + number + + +
    +
    in query
    +
    +
    +

    Offset

    +
    +
    +
    +
    +
    count: + + number + + +
    +
    in query
    +
    +
    +

    Number of items

    +
    +
    +
    +
    +
    sort: + + string + + +
    +
    in query
    +
    +
    +

    Sort column (-createdAt for example)

    +
    +
    +
    +
    +
    query: + + string + + +
    + +
    in query
    +
    +
    +

    String to search

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    200 OK
    +
    + + Video + +
    + +
    +
    +

    successful operation

    +
    +
    +
    +
    type
    +
    + + + Video + + + +
    +
    +
    +
    +
    +
    Response Content-Types: + application/json +
    +
    +
    Response Example + (200 OK) +
    +
    [
    +  {
    +    "id": "number",
    +    "uuid": "string",
    +    "createdAt": "string",
    +    "publishedAt": "string",
    +    "updatedAt": "string",
    +    "category": {
    +      "id": "number",
    +      "label": "string"
    +    },
    +    "licence": {
    +      "id": "number",
    +      "label": "string"
    +    },
    +    "language": {
    +      "id": "string",
    +      "label": "string"
    +    },
    +    "privacy": "string",
    +    "description": "string",
    +    "duration": "number",
    +    "isLocal": "boolean",
    +    "name": "string",
    +    "thumbnailPath": "string",
    +    "previewPath": "string",
    +    "embedPath": "string",
    +    "views": "number",
    +    "likes": "number",
    +    "dislikes": "number",
    +    "nsfw": "boolean",
    +    "account": {
    +      "name": "string",
    +      "displayName": "string",
    +      "url": "string",
    +      "host": "string",
    +      "avatar": {
    +        "path": "string",
    +        "createdAt": "string",
    +        "updatedAt": "string"
    +      }
    +    }
    +  }
    +]
    +
    + +
    +
    +
    +

    Schema Definitions

    diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index c84dc3307..7e290a41e 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -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: -- cgit v1.2.3