mirror of
https://github.com/furyhawk/api_gateway.git
synced 2026-07-21 02:06:50 +00:00
- Create core application structure with FastAPI - Implement dynamic route registration and management endpoints - Define configuration models for gateway settings, upstreams, and routes - Add proxy request handling for upstream services - Include example configuration and OpenAPI specification files - Set up development dependencies and project metadata
517 lines
13 KiB
JSON
517 lines
13 KiB
JSON
{
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "LTA DataMall Bus Backend",
|
|
"version": "0.1.1"
|
|
},
|
|
"paths": {
|
|
"/healthz": {
|
|
"get": {
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Healthz",
|
|
"operationId": "healthz_healthz_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object",
|
|
"title": "Response Healthz Healthz Get"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/readyz": {
|
|
"get": {
|
|
"tags": [
|
|
"Health"
|
|
],
|
|
"summary": "Readyz",
|
|
"operationId": "readyz_readyz_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object",
|
|
"title": "Response Readyz Readyz Get"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/bus-arrival": {
|
|
"get": {
|
|
"tags": [
|
|
"Bus"
|
|
],
|
|
"summary": "Bus Arrival",
|
|
"operationId": "bus_arrival_api_v1_bus_arrival_get",
|
|
"parameters": [
|
|
{
|
|
"name": "BusStopCode",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"minLength": 5,
|
|
"maxLength": 5,
|
|
"title": "Busstopcode"
|
|
}
|
|
},
|
|
{
|
|
"name": "ServiceNo",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Serviceno"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Response Bus Arrival Api V1 Bus Arrival Get"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/bus-services": {
|
|
"get": {
|
|
"tags": [
|
|
"Bus"
|
|
],
|
|
"summary": "Bus Services",
|
|
"operationId": "bus_services_api_v1_bus_services_get",
|
|
"parameters": [
|
|
{
|
|
"name": "ServiceNo",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Serviceno"
|
|
}
|
|
},
|
|
{
|
|
"name": "$skip",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "$Skip"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Response Bus Services Api V1 Bus Services Get"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/bus-routes": {
|
|
"get": {
|
|
"tags": [
|
|
"Bus"
|
|
],
|
|
"summary": "Bus Routes",
|
|
"operationId": "bus_routes_api_v1_bus_routes_get",
|
|
"parameters": [
|
|
{
|
|
"name": "$skip",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "$Skip"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Response Bus Routes Api V1 Bus Routes Get"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/bus-stops": {
|
|
"get": {
|
|
"tags": [
|
|
"Bus"
|
|
],
|
|
"summary": "Bus Stops",
|
|
"operationId": "bus_stops_api_v1_bus_stops_get",
|
|
"parameters": [
|
|
{
|
|
"name": "BusStopCode",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 5,
|
|
"maxLength": 5
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Busstopcode"
|
|
}
|
|
},
|
|
{
|
|
"name": "$skip",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "$Skip"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Response Bus Stops Api V1 Bus Stops Get"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/passenger-volume/bus": {
|
|
"get": {
|
|
"tags": [
|
|
"Bus"
|
|
],
|
|
"summary": "Passenger Volume Bus",
|
|
"operationId": "passenger_volume_bus_api_v1_passenger_volume_bus_get",
|
|
"parameters": [
|
|
{
|
|
"name": "Date",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"pattern": "^[0-9]{6}$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Date"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Response Passenger Volume Bus Api V1 Passenger Volume Bus Get"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/passenger-volume/od-bus": {
|
|
"get": {
|
|
"tags": [
|
|
"Bus"
|
|
],
|
|
"summary": "Passenger Volume Od Bus",
|
|
"operationId": "passenger_volume_od_bus_api_v1_passenger_volume_od_bus_get",
|
|
"parameters": [
|
|
{
|
|
"name": "Date",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"pattern": "^[0-9]{6}$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "Date"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Response Passenger Volume Od Bus Api V1 Passenger Volume Od Bus Get"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/planned-bus-routes": {
|
|
"get": {
|
|
"tags": [
|
|
"Bus"
|
|
],
|
|
"summary": "Planned Bus Routes",
|
|
"operationId": "planned_bus_routes_api_v1_planned_bus_routes_get",
|
|
"parameters": [
|
|
{
|
|
"name": "$skip",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"title": "$Skip"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful Response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"title": "Response Planned Bus Routes Api V1 Planned Bus Routes Get"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HTTPValidationError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"HTTPValidationError": {
|
|
"properties": {
|
|
"detail": {
|
|
"items": {
|
|
"$ref": "#/components/schemas/ValidationError"
|
|
},
|
|
"type": "array",
|
|
"title": "Detail"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"title": "HTTPValidationError"
|
|
},
|
|
"ValidationError": {
|
|
"properties": {
|
|
"loc": {
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
}
|
|
]
|
|
},
|
|
"type": "array",
|
|
"title": "Location"
|
|
},
|
|
"msg": {
|
|
"type": "string",
|
|
"title": "Message"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"title": "Error Type"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"loc",
|
|
"msg",
|
|
"type"
|
|
],
|
|
"title": "ValidationError"
|
|
}
|
|
}
|
|
}
|
|
} |