fix: move 5 path-param endpoints to query params for Vercel routing (#472)

Vercel's `api/[domain]/v1/[rpc].ts` captures one dynamic segment.
Path params like `/get-humanitarian-summary/SA` add an extra segment
that has no matching route file, causing 404 on both OPTIONS preflight
and direct requests. These endpoints were broken in production.

Changes:
- Remove `{param}` from 5 service.proto HTTP paths
- Add `(sebuf.http.query)` annotations to request message fields
- Update generated client/server code to use URLSearchParams
- Update OpenAPI specs (YAML + JSON) to declare query params
- Add early-return guards in 4 handlers for missing required params
- Add happy.worldmonitor.app to runtime.ts redirect hosts

Affected endpoints:
- GET /api/conflict/v1/get-humanitarian-summary?country_code=SA
- GET /api/economic/v1/get-fred-series?series_id=T10Y2Y&limit=120
- GET /api/market/v1/get-country-stock-index?country_code=US
- GET /api/intelligence/v1/get-country-intel-brief?country_code=US
- GET /api/military/v1/get-aircraft-details?icao24=a12345
This commit is contained in:
Elie Habib
2026-02-27 21:01:05 +04:00
committed by GitHub
parent 6a85d42fda
commit 248bdad6ae
35 changed files with 73 additions and 64 deletions

View File

@@ -194,7 +194,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/market/v1/get-country-stock-index/{country_code}:
/api/market/v1/get-country-stock-index:
get:
tags:
- MarketService
@@ -203,7 +203,7 @@ paths:
operationId: GetCountryStockIndex
parameters:
- name: country_code
in: path
in: query
description: ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "JP").
required: true
schema: