{"openapi":"3.1.0","info":{"title":"forkin API","description":"Каталог мест forkin: поиск, геофильтры, импорт OpenStreetMap и подсказки организаций DaData. Веб-демо: /demo/.","version":"1.1.0"},"servers":[{"url":"http://forkin.194.104.10.8.sslip.io/forkin","description":"Generated server url"}],"tags":[{"name":"Service","description":"Служебные эндпоинты"},{"name":"Restaurants","description":"Рестораны и точки встреч"},{"name":"Places","description":"Каталог мест: поиск, геофильтр и импорт OpenStreetMap"},{"name":"Meetings","description":"Встречи (правка администратором)"}],"paths":{"/meetings/{id}":{"put":{"tags":["Meetings"],"summary":"Правка описания/фото встречи (админ)","operationId":"update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Admin-Token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MeetingUpdateResponse"}}}}},"security":[{"adminToken":[]}]}},"/api/v1/places/imports":{"post":{"tags":["Places"],"summary":"Импорт мест в радиусе 100–5000 м; требуется X-Admin-Token","operationId":"importPlaces","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}}}}},"/restaurants":{"get":{"tags":["Restaurants"],"summary":"Список ресторанов","operationId":"list","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Restaurant"}}}}}}}},"/restaurants/{id}":{"get":{"tags":["Restaurants"],"summary":"Получить ресторан по идентификатору","operationId":"get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Restaurant"}}}}}}},"/health":{"get":{"tags":["Service"],"summary":"Проверка живости сервера","operationId":"health","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/api/v1/places":{"get":{"tags":["Places"],"summary":"Поиск по названию, кухне и адресу с пагинацией","operationId":"search","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"latitude","in":"query","required":false,"schema":{"type":"number","format":"double"}},{"name":"longitude","in":"query","required":false,"schema":{"type":"number","format":"double"}},{"name":"radiusMeters","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":2000}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"name"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"includeDemo","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PlacePage"}}}}}}},"/api/v1/places/{id}":{"get":{"tags":["Places"],"operationId":"get_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PlaceDto"}}}}}}},"/api/v1/places/suggest":{"get":{"tags":["Places"],"summary":"Подсказки из локального каталога без запросов во внешний API","operationId":"suggest","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlaceSuggestion"}}}}}}}},"/api/v1/places/providers":{"get":{"tags":["Places"],"operationId":"providers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/api/v1/places/organizations/suggest":{"get":{"tags":["Places"],"summary":"Необязательные подсказки юридических лиц DaData по названию/ИНН","operationId":"organizations","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"X-Admin-Token","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrganizationPage"}}}}}}},"/api/v1/places/imports/history":{"get":{"tags":["Places"],"operationId":"history","parameters":[{"name":"X-Admin-Token","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImportRun"}}}}}}}},"/api/v1/places/catalog/status":{"get":{"tags":["catalog-snapshot-controller"],"operationId":"status","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}}}}},"components":{"schemas":{"MeetingUpdateRequest":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":4000,"minLength":0},"photoUrl":{"type":["string","null"],"maxLength":200,"minLength":0},"descriptionNotNull":{"type":"string"},"photoUrlNotNull":{"type":"string"}}},"MeetingUpdateResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"id":{"type":"string"}}},"ImportRequest":{"type":"object","properties":{"latitude":{"type":"number","format":"double","maximum":85.0,"minimum":-85.0},"longitude":{"type":"number","format":"double","maximum":180.0,"minimum":-180.0},"radiusMeters":{"type":"integer","format":"int32","maximum":5000,"minimum":100}},"required":["latitude","longitude","radiusMeters"]},"ImportResult":{"type":"object","properties":{"runId":{"type":"string"},"count":{"type":"integer","format":"int32"},"cached":{"type":"boolean"},"importedAt":{"type":"string"},"attribution":{"type":"string"}}},"Restaurant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"cuisine":{"type":"string"},"address":{"type":"string"},"rating":{"type":"number","format":"double"},"photoUrl":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"category":{"type":"string"},"city":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"openingHours":{"type":"string"},"source":{"type":"string"},"sourceUrl":{"type":"string"},"importedAt":{"type":"string"}}},"PlaceDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"cuisine":{"type":"string"},"address":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"category":{"type":"string"},"city":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"openingHours":{"type":"string"},"photoUrl":{"type":"string"},"rating":{"type":["number","null"],"format":"double"},"source":{"type":"string"},"sourceUrl":{"type":"string"},"importedAt":{"type":"string"},"distanceMeters":{"type":["integer","null"],"format":"int32"},"isDemo":{"type":"boolean"}}},"PlacePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlaceDto"}},"total":{"type":"integer","format":"int64"},"page":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"hasMore":{"type":"boolean"},"attribution":{"type":"string"},"licenseUrl":{"type":"string"}}},"PlaceSuggestion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"source":{"type":"string"}}},"OrganizationPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSuggestion"}},"note":{"type":"string"}}},"OrganizationSuggestion":{"type":"object","properties":{"name":{"type":"string"},"inn":{"type":"string"},"ogrn":{"type":"string"},"address":{"type":"string"},"status":{"type":"string"},"source":{"type":"string"}}},"ImportRun":{"type":"object","properties":{"id":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"radiusMeters":{"type":"integer","format":"int32"},"status":{"type":"string"},"importedCount":{"type":"integer","format":"int32"},"startedAt":{"type":"string"},"finishedAt":{"type":"string"},"error":{"type":"string"}}}},"securitySchemes":{"adminToken":{"type":"apiKey","name":"X-Admin-Token","in":"header"}}}}