Skip to content

Conversation

@GreatAuk
Copy link
Contributor

@GreatAuk GreatAuk commented Oct 24, 2025

1. 以 cli 方式使用时添加交互行为

对接多个后端服务挺常见的,提供交互式的行为让用户自己选择要生成哪些服务。

Screen-2025-10-24-135022.mp4

2. 新增 defineConfig 定义配置

这比直接 as 类型优雅

import { defineConfig } from 'openapi-ts-request';

export default defineConfig([
  {
    schemaPath: 'http://petstore.swagger.io/v2/swagger.json',
    serversPath: './apis/app',
    describe: 'Petstore API-1',
  }
]);

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2025

🦋 Changeset detected

Latest commit: 63abdd6

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

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.

README-en_US.md
agents.md
上述文档需要进行同步更改

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.

很好的交互性优化

@GreatAuk
Copy link
Contributor Author

代码已提交

@rookie-luochao rookie-luochao merged commit b845463 into openapi-ui:main Oct 28, 2025
1 check passed
@GreatAuk
Copy link
Contributor Author

一般什么时候 release ?

rookie-luochao added a commit that referenced this pull request Oct 28, 2025
* build(deps-dev): bump @types/node from 24.8.0 to 24.9.1

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.8.0 to 24.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* feat: 以 cli 方式使用时添加交互行为 & 新增 defineConfig 定义配置 (#543)

* feat: 以 cli 方式使用时,如果有一个以上的配置项,则通过可交互的形式让用户自己选择要生成的 service

* feat: 新增 defineConfig 函数,为定义配置时提供 ts 类型提示

* docs: 更新文档-关于 defineConfig & options.describe

* docs: 更新文档-关于代码贡献

* docs: create changelog

* docs: update changelog

---------

Co-authored-by: 故城 <[email protected]>

* chore: clean code

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Utopia <[email protected]>
@rookie-luochao
Copy link
Member

一般什么时候 release ?

已发布

@GreatAuk
Copy link
Contributor Author

谢谢

@rookie-luochao
Copy link
Member

太客气啦😁

@rookie-luochao
Copy link
Member

请问你使用过 uniqueKey 没有,我感觉加了你这个功能,有点冗余,我想删掉了

@GreatAuk
Copy link
Contributor Author

没有,感觉使用起来有点麻烦

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