From d8e57a6b2c13063eb21d46f6946b7e7085081b99 Mon Sep 17 00:00:00 2001 From: Alexander Garin Date: Tue, 28 Mar 2023 17:27:34 +0300 Subject: [PATCH] - Fixes --- .../spc_2b420b2bed1d4d868807303a581fb8c1.yml | 45 ++++++++++++++++-- ...1160cf39f5497fa4711fe4fd6567de0f6a24fa.yml | 47 +------------------ 2 files changed, 43 insertions(+), 49 deletions(-) diff --git a/.insomnia/ApiSpec/spc_2b420b2bed1d4d868807303a581fb8c1.yml b/.insomnia/ApiSpec/spc_2b420b2bed1d4d868807303a581fb8c1.yml index 52e09ed..69820d5 100755 --- a/.insomnia/ApiSpec/spc_2b420b2bed1d4d868807303a581fb8c1.yml +++ b/.insomnia/ApiSpec/spc_2b420b2bed1d4d868807303a581fb8c1.yml @@ -1,7 +1,7 @@ _id: spc_2b420b2bed1d4d868807303a581fb8c1 type: ApiSpec parentId: wrk_cd1160cf39f5497fa4711fe4fd6567de -modified: 1680013029849 +modified: 1680013585576 created: 1679916396495 fileName: youtubekids.yaml contents: >+ @@ -33,17 +33,24 @@ contents: >+ description: Get content for resource operationId: browse requestBody: + required: true content: application/json: schema: $ref: '#/components/schemas/BrowseRequestPayload' responses: '200': - description: Successful operation + description: OK content: 'application/json': "schema": - $ref: '#/components/schemas/BrowseResponse' + $ref: '#/components/schemas/BrowseResponsePayload' + '400': + description: Bad Request + content: + 'application/json': + "schema": + $ref: '#/components/schemas/ErrorResponsePayload' # Компоненты @@ -52,6 +59,17 @@ contents: >+ # Схемы данных schemas: + # Ошибка + Error: + type: object + properties: + message: + type: string + domain: + type: string + reason: + type: string + # Доступность данных AccessibilityData: type: object @@ -342,7 +360,7 @@ contents: >+ example: FEkids_home # Ответ на запрос получения контента определенного ресурса - BrowseResponse: + BrowseResponsePayload: type: object properties: responseContext: @@ -355,6 +373,25 @@ contents: >+ trackingParams: type: string + # Ответ с ошибкой + ErrorResponsePayload: + type: object + properties: + error: + type: object + properties: + code: + type: number + example: 400 + message: + type: string + errors: + type: array + items: + $ref: '#/components/schemas/Error' + status: + type: string + example: FAILED_PRECONDITION diff --git a/.insomnia/Request/req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa.yml b/.insomnia/Request/req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa.yml index 0e5b023..0887847 100755 --- a/.insomnia/Request/req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa.yml +++ b/.insomnia/Request/req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa.yml @@ -1,7 +1,7 @@ _id: req_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa type: Request parentId: fld_wrk_cd1160cf39f5497fa4711fe4fd6567de0f6a24fa -modified: 1679919070840 +modified: 1680013066020 created: 1679919032177 url: "{{ base_url }}/browse" name: Browse resource content @@ -12,50 +12,7 @@ body: text: |- { "context": { - "client": { - "clientName": "WEB_KIDS", - "clientVersion": "2.20230202.00.00", - "hl": "ru", - "gl": "RU", - "experimentsToken": "string", - "browserName": "Safari", - "deviceMake": "apple", - "browserVersion": "16.2", - "osName": "Macintosh", - "osVersion": "10_15_7", - "platform": "DESKTOP", - "kidsAppInfo": { - "contentSettings": { - "corpusPreference": "KIDS_CORPUS_PREFERENCE_TWEEN", - "kidsNoSearchMode": "YT_KIDS_NO_SEARCH_MODE_OFF" - }, - "categorySettings": { - "enabledCategories": [ - "approved_for_you", - "black_joy", - "camp", - "collections", - "earth", - "explore", - "favorites", - "gaming", - "halloween", - "hero", - "learning", - "making", - "move", - "music", - "reading", - "shared_by_parents", - "shows", - "soccer", - "sports", - "spotlight", - "winter" - ] - } - } - } + }, "browseId": "FEkids_home" }