Skip to content

Commit 771756a

Browse files
Merge pull request #449 from openapi-ui/main
chore: merge main to release
2 parents 8dbaddd + 6bc402a commit 771756a

10 files changed

+14
-8
lines changed

.changeset/lemon-webs-write.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openapi-ts-request': patch
3+
---
4+
5+
fix: fix bug #445

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout repository
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@v5
1313

1414
- name: Install pnpm
1515
uses: pnpm/action-setup@v4

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout repository
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v5
1414

1515
- name: Use node.js
1616
uses: actions/setup-node@v4

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
openapi-ts-request.cache.json

openapi-ts-request.cache.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"用户": "user",
55
"宠物们": "pets",
66
"你好": "hello"
7-
}
7+
}

src/generator/serviceGenarator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ export default class ServiceGenerator {
10481048
const response: ResponseObject | undefined =
10491049
responses &&
10501050
this.resolveRefObject(
1051-
responses.default || responses['200'] || responses['201']
1051+
responses['200'] || responses['201'] || responses.default
10521052
);
10531053
const defaultResponse = {
10541054
mediaType: '*/*',

test/__snapshots__/common/小驼峰命名文件和请求函数.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ export async function userCreateWithListUsingPost({
682682
body: API.UserCreateWithListUsingPostBody;
683683
options?: { [key: string]: unknown };
684684
}) {
685-
return request<unknown>('/user/createWithList', {
685+
return request<API.User>('/user/createWithList', {
686686
method: 'POST',
687687
headers: {
688688
'Content-Type': 'application/json',

test/__snapshots__/common/支持 null 类型作为默认值.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ export async function userCreateWithListUsingPost({
682682
body: API.UserCreateWithListUsingPostBody;
683683
options?: { [key: string]: unknown };
684684
}) {
685-
return request<unknown>('/user/createWithList', {
685+
return request<API.User>('/user/createWithList', {
686686
method: 'POST',
687687
headers: {
688688
'Content-Type': 'application/json',

test/__snapshots__/common/正常命名文件和请求函数.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ export async function userCreateWithListUsingPost({
682682
body: API.UserCreateWithListUsingPostBody;
683683
options?: { [key: string]: unknown };
684684
}) {
685-
return request<unknown>('/user/createWithList', {
685+
return request<API.User>('/user/createWithList', {
686686
method: 'POST',
687687
headers: {
688688
'Content-Type': 'application/json',

test/__snapshots__/common/测试将中文 tag 名称翻译成英文 tag 名称.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ export async function userCreateWithListUsingPost({
660660
body: API.UserCreateWithListUsingPostBody;
661661
options?: { [key: string]: unknown };
662662
}) {
663-
return request<unknown>('/user/createWithList', {
663+
return request<API.User>('/user/createWithList', {
664664
method: 'POST',
665665
headers: {
666666
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)