@25sprout/react-starter
Version:
25sprout web starter with React
214 lines (213 loc) • 6.27 kB
JSON
{
"openapi": "3.0.0",
"info": { "title": "BackStageX API Document", "version": "2.0.0" },
"servers": [{ "url": "" }],
"paths": {
"/api/bsxfeature/v1/banner": {
"get": {
"tags": ["feature_website_banner"],
"description": "取得 Banner 列表。若 Banner 類型為圖像,則 youtube_link, auto_play 為空;若 Banner 類型為 YouTube 影片,則 link, image, image_mobile 為空。無設定手機版 Banner 圖像,則 image_mobile 為空。",
"test": "d2d9bf6d837c7945c310a426a49dfc93",
"responses": {
"200": {
"description": "註:auto_play 具有兩種變數狀態,AUTOPLAY_ON (啟用自動播放) / AUTOPLAY_OFF (關閉自動播放)",
"content": {
"application/json": {
"schema": {
"type": "object",
"allOf": [
{ "$ref": "#/components/schemas/apiResponseTemplate" },
{
"properties": {
"data": {
"properties": {
"data": {
"type": "array",
"items": { "$ref": "#/components/schemas/BannerResource" }
}
},
"type": "object"
}
}
}
]
}
}
}
}
}
}
},
"/api/bsxfeature/v1/banner/{id}": {
"get": {
"tags": ["feature_website_banner"],
"description": "取得單一 Banner 資訊。",
"test": "5f23f912c83158bb53be719e2eb935ab",
"parameters": [
{
"name": "id",
"in": "path",
"description": "banner id 編號",
"required": true,
"schema": { "type": "integer", "default": "1" }
}
],
"responses": {
"200": {
"description": "註:auto_play 只具有兩種狀態,AUTOPLAY_ON (啟用自動播放) / AUTOPLAY_OFF (關閉自動播放)",
"content": {
"application/json": {
"schema": {
"type": "object",
"allOf": [
{ "$ref": "#/components/schemas/apiResponseTemplate" },
{
"properties": {
"data": {
"properties": {
"data": { "$ref": "#/components/schemas/BannerResource" }
},
"type": "object"
}
}
}
]
}
}
}
}
}
}
},
"/api/v1/locations": {
"get": {
"tags": ["feature_website_locations"],
"description": "",
"test": "2c5ac3cfa0b46a120061335f36df0033",
"parameters": [
{
"name": "pageNum",
"in": "query",
"description": "服務據點列表頁數",
"required": false,
"schema": { "type": "integer", "default": "" }
},
{
"name": "filter",
"in": "query",
"description": "服務據點搜尋條件",
"required": false,
"schema": { "type": "string", "default": "" }
}
],
"responses": {
"200": {
"description": "依據 argument 會得到不同列表,若無 argument 則預設為服務據點列表的第一頁。使用 query string 夾帶 pageNum 可取得指定頁數的服務據點列表,每頁 6 個服務據點;使用 qurey string 夾帶 filter 可取得含有搜尋條件的服務據點列表。",
"content": {
"application/json": {
"schema": {
"type": "object",
"allOf": [
{ "$ref": "#/components/schemas/apiResponseTemplate" },
{
"properties": {
"data": {
"properties": {
"data": {
"type": "array",
"items": { "$ref": "#/components/schemas/LocationResource" }
}
},
"type": "object"
}
}
}
]
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"BannerResource": {
"properties": {
"id": { "type": "integer", "format": "int64", "example": 1 },
"name": { "type": "string", "example": "範例 Banner" },
"subtitle": { "type": "string", "example": "API 文件範例 Banner" },
"link": { "type": "string", "example": "" },
"image": { "type": "string", "example": "" },
"image_mobile": { "type": "string", "example": "" },
"youtube_link": {
"type": "string",
"example": "https://www.youtube.com/watch?v=juqyzgnbspY"
},
"auto_play": { "type": "boolean", "example": "AUTOPLAY_ON" },
"weight": { "type": "integer", "example": "0" }
},
"required": [
"id",
"name",
"subtitle",
"link",
"image",
"image_mobile",
"youtube_link",
"auto_play",
"weight"
],
"type": "object"
},
"LocationResource": {
"properties": {
"id": { "type": "integer", "format": "int64", "example": 1 },
"photo": { "description": "服務據點圖片", "type": "string", "example": "" },
"name": { "description": "服務據點名稱", "type": "string", "example": "" },
"telephone_number": {
"description": "服務據點聯絡電話",
"type": "string",
"example": ""
},
"address": { "description": "服務據點完整地址", "type": "string", "example": "" },
"address_city": { "description": "服務據點縣市", "type": "string", "example": "" },
"address_district": {
"description": "服務據點鄉鎮市區",
"type": "string",
"example": ""
},
"address_detail": { "description": "服務據點詳細地址", "type": "string", "example": "" },
"business_hours": { "description": "服務據點營業時間", "type": "string", "example": "" },
"weight": { "description": "服務據點權重", "type": "integer", "example": "0" }
},
"type": "object"
}
},
"securitySchemes": {
"admin_user_token": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"description": "Bearer <token>",
"name": "Authorization",
"in": "header"
},
"user_token": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"description": "Bearer <token>",
"name": "Authorization",
"in": "header"
},
"mail_verify_token": {
"type": "apiKey",
"description": "email 驗證用,單純的亂數",
"name": "Authorization",
"in": "header"
}
}
}
}