turash/concept/schemas/match_response.json
Damir Mukimov 4a2fda96cd
Initial commit: Repository setup with .gitignore, golangci-lint v2.6.0, and code quality checks
- Initialize git repository
- Add comprehensive .gitignore for Go projects
- Install golangci-lint v2.6.0 (latest v2) globally
- Configure .golangci.yml with appropriate linters and formatters
- Fix all formatting issues (gofmt)
- Fix all errcheck issues (unchecked errors)
- Adjust complexity threshold for validation functions
- All checks passing: build, test, vet, lint
2025-11-01 07:36:22 +01:00

103 lines
3.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cityresourcegraph.com/schemas/match_response.json",
"title": "Match Response",
"description": "Response schema for resource match results",
"type": "object",
"properties": {
"matches": {
"type": "array",
"items": {
"$ref": "#/definitions/match"
},
"description": "Array of matching opportunities"
},
"metadata": {
"type": "object",
"properties": {
"total_count": {
"type": "integer",
"minimum": 0,
"description": "Total matches found"
},
"query_time_ms": {
"type": "integer",
"minimum": 0,
"description": "Query execution time"
},
"cache_hit": {
"type": "boolean",
"description": "Whether result came from cache"
},
"precision_levels": {
"type": "object",
"properties": {
"measured": {"type": "integer"},
"estimated": {"type": "integer"},
"rough": {"type": "integer"}
},
"description": "Breakdown by data precision"
}
},
"required": ["total_count"]
}
},
"required": ["matches", "metadata"],
"definitions": {
"match": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Match identifier"
},
"compatibility_score": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Overall compatibility score (0-1)"
},
"economic_value": {
"type": "number",
"description": "Estimated annual economic value (€)"
},
"distance_km": {
"type": "number",
"minimum": 0,
"description": "Distance between sites (km)"
},
"source_resource": {
"$ref": "https://cityresourcegraph.com/schemas/resource_flow.json"
},
"target_resource": {
"$ref": "https://cityresourcegraph.com/schemas/resource_flow.json"
},
"transportation_estimate": {
"type": "object",
"properties": {
"cost_per_year": {"type": "number"},
"method": {"type": "string"},
"feasibility_score": {"type": "number", "minimum": 0, "maximum": 1}
}
},
"risk_assessment": {
"type": "object",
"properties": {
"technical_risk": {"type": "number", "minimum": 0, "maximum": 1},
"regulatory_risk": {"type": "number", "minimum": 0, "maximum": 1},
"market_risk": {"type": "number", "minimum": 0, "maximum": 1}
}
},
"partner_packet_url": {
"type": "string",
"format": "uri",
"description": "URL to detailed partner information packet"
}
},
"required": ["id", "compatibility_score", "economic_value", "source_resource", "target_resource"]
}
},
"additionalProperties": false
}