Equipment category schema rationalization
- 主要語言
- TypeScript
- 星號
- 934
- 分支
- 427
- 平均合併
- 17 小時 25 分鐘
- 30 天內合併 PR
- 22
描述
There's a general schema for links to other entities that looks like this:
```json
"equipment_category": {
"index": "armor",
"name": "Armor",
"url": "/api/equipment-categories/armor"
},
```
But most of the subcategories in 5e-SRD-Equipment.json look like this instead:
```json
"armor_category": "Light",
```
The one exception to this is `gear_category`:
```json
"gear_category": {
"index": "standard-gear",
"name": "Standard Gear",
"url": "/api/equipment-categories/standard-gear"
},
```
My initial thought was that the categories that were represented as simple strings weren't found in 5e-SRD-Equipment-Categories.json, but nope:
```json
{
"index": "light-armor",
"name": "Light Armor",
"equipment": [
{
"index": "padded",
"name": "Padded",
"url": "/api/equipment/padded"
},
{
"index": "leather",
"name": "Leather",
"url": "/api/equipment/leather"
},
{
"index": "studded-leather",
"name": "Studded Leather",
"url": "/api/equipment/studded-leather"
}
],
"url": "/api/equipment-categories/light-armor"
},
```
I'm not sure what the policy is for breaking changes.
1. Can I put up a PR to fix this?
2. Since all of the subcategory types (`gear_category`, `armor_category`, `vehicle_category`, `tool_category`, `weapon_category`) appear at first glance to be mutually exclusive, can this be consolidated as an `equipment_subcategory` field?
貢獻指南
研究方向
Examine the JSON schema in the repository, particularly 5e-SRD-Equipment.json and 5e-SRD-Equipment-Categories.json. Understand the current structure of equipment categories and subcategories. The task is to rationalize the schema, potentially changing string fields to structured objects and possibly consolidating subcategory fields. Check for any existing tests or validation scripts to ensure changes are consistent. The goal is a PR that aligns the schema without breaking existing API consumers.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- json, typescript
- 領域
- api, database
- Issue 類型
- 重構
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100