mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-27 17:38:51 +05:00
docs(unified): update OpenAPI info, replace /search/multi with /search, and describe source param
This commit is contained in:
@@ -161,8 +161,8 @@ func getOpenAPISpecWithURL(baseURL string) *OpenAPISpec {
|
|||||||
OpenAPI: "3.0.0",
|
OpenAPI: "3.0.0",
|
||||||
Info: Info{
|
Info: Info{
|
||||||
Title: "Neo Movies API",
|
Title: "Neo Movies API",
|
||||||
Description: "Современный API для поиска фильмов и сериалов с интеграцией TMDB и поддержкой авторизации",
|
Description: "Унифицированный API (TMDB/Kinopoisk) с префиксными ID (kp_*, tmdb_*) и единым форматом данных",
|
||||||
Version: "2.0.0",
|
Version: "3.0.0",
|
||||||
Contact: Contact{
|
Contact: Contact{
|
||||||
Name: "API Support",
|
Name: "API Support",
|
||||||
URL: "https://github.com/your-username/neomovies-api-go",
|
URL: "https://github.com/your-username/neomovies-api-go",
|
||||||
@@ -194,10 +194,10 @@ func getOpenAPISpecWithURL(baseURL string) *OpenAPISpec {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"/api/v1/search/multi": map[string]interface{}{
|
"/api/v1/search": map[string]interface{}{
|
||||||
"get": map[string]interface{}{
|
"get": map[string]interface{}{
|
||||||
"summary": "Мультипоиск",
|
"summary": "Унифицированный поиск",
|
||||||
"description": "Поиск фильмов, сериалов и актеров",
|
"description": "Поиск фильмов и сериалов в источниках TMDB или Kinopoisk",
|
||||||
"tags": []string{"Search"},
|
"tags": []string{"Search"},
|
||||||
"parameters": []map[string]interface{}{
|
"parameters": []map[string]interface{}{
|
||||||
{
|
{
|
||||||
@@ -207,6 +207,13 @@ func getOpenAPISpecWithURL(baseURL string) *OpenAPISpec {
|
|||||||
"schema": map[string]string{"type": "string"},
|
"schema": map[string]string{"type": "string"},
|
||||||
"description": "Поисковый запрос",
|
"description": "Поисковый запрос",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "source",
|
||||||
|
"in": "query",
|
||||||
|
"required": true,
|
||||||
|
"schema": map[string]interface{}{"type": "string", "enum": []string{"kp", "tmdb"}},
|
||||||
|
"description": "Источник: kp или tmdb",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "page",
|
"name": "page",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
@@ -216,7 +223,7 @@ func getOpenAPISpecWithURL(baseURL string) *OpenAPISpec {
|
|||||||
},
|
},
|
||||||
"responses": map[string]interface{}{
|
"responses": map[string]interface{}{
|
||||||
"200": map[string]interface{}{
|
"200": map[string]interface{}{
|
||||||
"description": "Результаты поиска",
|
"description": "Результаты поиска (унифицированные)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user