feat: implement relation management system with controllers, services, repositories, and corresponding API documentation.
Build and Release / release (push) Successful in 1m47s

This commit is contained in:
2026-06-06 17:22:03 +07:00
parent 7ff15ae662
commit fd8d413760
15 changed files with 706 additions and 192 deletions
+69 -1
View File
@@ -895,6 +895,13 @@ const docTemplate = `{
"name": "has_bound",
"in": "query"
},
{
"maximum": 100,
"minimum": 1,
"type": "integer",
"name": "limit",
"in": "query"
},
{
"maximum": 90,
"minimum": -90,
@@ -2933,6 +2940,66 @@ const docTemplate = `{
}
}
},
"/relations": {
"get": {
"description": "Get relations by type (wiki-entity, entity-wiki, geometry-entity, entity-geometry) and list of IDs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Relations"
],
"summary": "Get generalized batch relations",
"parameters": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "ids",
"in": "query",
"required": true
},
{
"enum": [
"wiki-entity",
"entity-wiki",
"geometry-entity",
"entity-geometry"
],
"type": "string",
"name": "type",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/relations/entities-by-geometries": {
"get": {
"description": "Get entities grouped by geometry IDs",
@@ -4900,7 +4967,8 @@ const docTemplate = `{
"type": "string"
},
"question": {
"type": "string"
"type": "string",
"maxLength": 500
}
}
},
+69 -1
View File
@@ -888,6 +888,13 @@
"name": "has_bound",
"in": "query"
},
{
"maximum": 100,
"minimum": 1,
"type": "integer",
"name": "limit",
"in": "query"
},
{
"maximum": 90,
"minimum": -90,
@@ -2926,6 +2933,66 @@
}
}
},
"/relations": {
"get": {
"description": "Get relations by type (wiki-entity, entity-wiki, geometry-entity, entity-geometry) and list of IDs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Relations"
],
"summary": "Get generalized batch relations",
"parameters": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv",
"name": "ids",
"in": "query",
"required": true
},
{
"enum": [
"wiki-entity",
"entity-wiki",
"geometry-entity",
"entity-geometry"
],
"type": "string",
"name": "type",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/relations/entities-by-geometries": {
"get": {
"description": "Get entities grouped by geometry IDs",
@@ -4893,7 +4960,8 @@
"type": "string"
},
"question": {
"type": "string"
"type": "string",
"maxLength": 500
}
}
},
+48
View File
@@ -82,6 +82,7 @@ definitions:
project_id:
type: string
question:
maxLength: 500
type: string
required:
- question
@@ -1327,6 +1328,11 @@ paths:
- in: query
name: has_bound
type: boolean
- in: query
maximum: 100
minimum: 1
name: limit
type: integer
- in: query
maximum: 90
minimum: -90
@@ -2655,6 +2661,48 @@ paths:
summary: Get raster tile metadata
tags:
- Tile
/relations:
get:
consumes:
- application/json
description: Get relations by type (wiki-entity, entity-wiki, geometry-entity,
entity-geometry) and list of IDs
parameters:
- collectionFormat: csv
in: query
items:
type: string
minItems: 1
name: ids
required: true
type: array
- enum:
- wiki-entity
- entity-wiki
- geometry-entity
- entity-geometry
in: query
name: type
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
summary: Get generalized batch relations
tags:
- Relations
/relations/entities-by-geometries:
get:
consumes: