IQSS / IQSS/dataverse-client-javascript

Refactor ApiRepository for enhanced generality and abstraction

未关闭
#136 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

pm.GREI-d-2.7.1 pm.GREI-d-2.7.2
主要语言
TypeScript
星标
20
派生
11
平均合并
2 天 5 小时
30 天内合并 PR
1

描述

Overview of the Feature Request

The ApiRepository currently incorporates logic that is specific to particular resource types. This approach limits the generic utility of the repository and necessitates direct checks on these types within the repository itself. The proposal is to enhance the generality of ApiRepository by abstracting away resource-specific logic.

What Inspired the Request?

The need for a more generic ApiRepository was identified during a code review. The current implementation requires direct checks on resource types, which can complicate the codebase and reduce the modularity and reusability of the repository.

What Existing Behavior Do You Want Changed?

None, this is just a refactor.

Any Brand New Behavior Do You Want to Add to js-dataverse?

None, this is just a refactor.

Any Open or Closed Issues Related to This Feature Request?

No

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先定位 ApiRepository,并查看链接的 pull request 讨论,其中确定了特定资源的检查逻辑。确定哪些逻辑与特定资源类型相关联,并定义一种能够保留现有行为的抽象;完成此项工作需要就重构范围达成一致,并验证当前行为保持不变。

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

评估

技术栈
typescript
领域
api
Issue 类型
重构
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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