Skip to content

Conversation

AdoKevin
Copy link
Contributor

@AdoKevin AdoKevin commented Jul 10, 2025

更新后又发现一个问题,types.ts 中生成的类型别名也带上了 namespace, 导致类型错误。

修改后更新了一遍快照确认了一次, 都是预期的修改。

Copy link

changeset-bot bot commented Jul 10, 2025

🦋 Changeset detected

Latest commit: 3061db4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-ts-request Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@rookie-luochao rookie-luochao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

@rookie-luochao
Copy link
Member

rookie-luochao commented Jul 11, 2025

我记得前段时间我加这个功能的时候,没有这个明显的多余前缀问题,难道我当时就看错了,就漏了测试用例了?

@rookie-luochao
Copy link
Member

我基于当时的commit 切了分支测试了一下,我当时加功能的时候确实没有这个bug

image

@rookie-luochao
Copy link
Member

我找到了,是你当时改动了这里,导致了bug😂

image

@AdoKevin
Copy link
Contributor Author

AdoKevin commented Jul 11, 2025

是的,就是这里的改动引起的,这个改动是为了解决当时版本 service中 response类型没有 namespace 的问题的,只是没有注意到types.ts 里面也用了这个添加了namespace的类型☹️。 现在这个PR改动就是区分了types里面的和 service里面使用的response 类型。

@AdoKevin
Copy link
Contributor Author

当时#385 这个PR里面提到了这个问题。

修复了一个问题,部分生成的response 类型没有namespace前缀。提交 7982ab9 可以看到修改前后快照的变更

@rookie-luochao rookie-luochao merged commit b7dd4d7 into openapi-ui:main Jul 11, 2025
1 check passed
@rookie-luochao
Copy link
Member

好的,好的,我测试一下

@rookie-luochao
Copy link
Member

感谢大佬🙏

@AdoKevin
Copy link
Contributor Author

我确认了一下提交 7982ab9 中单元测试快照的变更, 确实有点顾头不顾腚了哈哈。当时再仔细一点Review应该能看出点端倪的😢。
image

@AdoKevin AdoKevin deleted the namespace_in_types branch July 11, 2025 02:32
rookie-luochao added a commit that referenced this pull request Jul 14, 2025
* build(deps): bump bing-translate-api from 4.0.2 to 4.1.0

Bumps [bing-translate-api](https://github.com/plainheart/bing-translate-api) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/plainheart/bing-translate-api/releases)
- [Commits](plainheart/bing-translate-api@v4.0.2...v4.1.0)

---
updated-dependencies:
- dependency-name: bing-translate-api
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump @tanstack/react-query from 5.80.10 to 5.82.0

Bumps [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) from 5.80.10 to 5.82.0.
- [Release notes](https://github.com/TanStack/query/releases)
- [Commits](https://github.com/TanStack/query/commits/v5.82.0/packages/react-query)

---
updated-dependencies:
- dependency-name: "@tanstack/react-query"
  dependency-version: 5.82.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Merge pull request #398 from AdoKevin/namespace_in_types

fix: 修复引用类型返回值在 types.ts中也包含了 namespace 的问题

* chore: clean code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Law <kevinlaw1024@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants