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

Merge Spellcasting, StartingEquipment, and Class Levels into Class objects.

未关闭
#251 4 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
934
派生
427
平均合并
17 小时 25 分钟
30 天内合并 PR
22

描述

Currently, the 1:1 relationships of Class->Spellcasting and Class->StartingEquipment exist in the schema as URL strings, rather than the data simply being embedded in the Class object. This only serves to reduce the size of the Class endpoint response, but complicates the digestion of the data rather a lot. Having separate endpoints for Spellcasting and StartingEquipment also creates difficulty maintaining consistency in the structure of internal references; where all other references are suited to using the APIResource structure, these are simply incompatible due to the shape of the referenced data.

As for Class Levels, the size cost of including *all* Level data in the class resource is much greater than for Spellcasting or StartingEquipment. It would perhaps be more suitable, however, to provide references to class levels as an array of APIResources, rather than the current method of supplying a URL that returns such a list. This would again simplify the digestion of the API data greatly, including by reducing the number of API calls that have to be made. Additionally, leaving the Levels endpoint intact allows levels to be queried separately from Classes, if desired.

**In summary:**
- Merge Spellcasting and StartingEquipment data directly into Class objects, get rid of corresponding API endpoints
- Provide Class Levels as an array of APIResources in the Class object, keeping Levels endpoint

All of this can be applied to Subclasses, also.

Another one to discuss is class Spell lists. Move them into Spellcasting, or directly onto the Class object, as an array of APIResources, like Levels?

贡献指南

打开贡献指南

调研方向

Examine the Class, Spellcasting, and StartingEquipment objects in the schema to understand the current 1:1 relationships and URL references. Look at the Levels endpoint and how it's currently referenced. Determine how to embed Spellcasting and StartingEquipment data directly into Class objects and change Levels to an array of APIResources. Consider applying the same changes to Subclasses and decide on handling class Spell lists.

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
api, database
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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