5e-bits / 5e-bits/5e-database

Equipment category schema rationalization

未关闭
#397 11 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
good first issue
主要语言
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?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。