Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Feb 22, 2024
1 parent 60ad7b3 commit 53e1deb
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 148 deletions.
232 changes: 116 additions & 116 deletions __test__/3.0/LDFCore.ts

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions __test__/3.0/Petstore.ts
Expand Up @@ -104,7 +104,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand All @@ -127,25 +127,25 @@ export interface SwaggerApi {
* @summary Add a new pet to the store
* @tag pet
*/
post(url: '/pet', options: SwaggerOptions<{}, {}, {}, Pet>): Promise<Pet>
post(url: '/pet', options?: SwaggerOptions<{}, {}, {}, Pet>): Promise<Pet>
/**
* @description Update an existing pet by Id
* @summary Update an existing pet
* @tag pet
*/
put(url: '/pet', options: SwaggerOptions<{}, {}, {}, Pet>): Promise<Pet>
put(url: '/pet', options?: SwaggerOptions<{}, {}, {}, Pet>): Promise<Pet>
/**
* @description Multiple status values can be provided with comma separated strings
* @summary Finds Pets by status
* @tag pet
*/
get(url: '/pet/findByStatus', options: SwaggerOptions<{}, {status?: 'available' | 'pending' | 'sold'}, {}, unknown>): Promise<Array<Pet>>
get(url: '/pet/findByStatus', options?: SwaggerOptions<{}, {status?: 'available' | 'pending' | 'sold'}, {}, unknown>): Promise<Array<Pet>>
/**
* @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @summary Finds Pets by tags
* @tag pet
*/
get(url: '/pet/findByTags', options: SwaggerOptions<{}, {tags?: Array<string>}, {}, unknown>): Promise<Array<Pet>>
get(url: '/pet/findByTags', options?: SwaggerOptions<{}, {tags?: Array<string>}, {}, unknown>): Promise<Array<Pet>>
/**
* @description Returns a single pet
* @summary Find pet by ID
Expand All @@ -172,7 +172,7 @@ export interface SwaggerApi {
* @summary Returns pet inventories by status
* @tag store
*/
get(url: '/store/inventory', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<{
get(url: '/store/inventory', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<{
[key: string]: number
}
>
Expand All @@ -181,7 +181,7 @@ export interface SwaggerApi {
* @summary Place an order for a pet
* @tag store
*/
post(url: '/store/order', options: SwaggerOptions<{}, {}, {}, Order>): Promise<Order>
post(url: '/store/order', options?: SwaggerOptions<{}, {}, {}, Order>): Promise<Order>
/**
* @description For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @summary Find purchase order by ID
Expand All @@ -199,23 +199,23 @@ export interface SwaggerApi {
* @summary Create user
* @tag user
*/
post(url: '/user', options: SwaggerOptions<{}, {}, {}, User>): Promise<User>
post(url: '/user', options?: SwaggerOptions<{}, {}, {}, User>): Promise<User>
/**
* @description Creates list of users with given input array
* @summary Creates list of users with given input array
* @tag user
*/
post(url: '/user/createWithList', options: SwaggerOptions<{}, {}, {}, Array<User>>): Promise<User>
post(url: '/user/createWithList', options?: SwaggerOptions<{}, {}, {}, Array<User>>): Promise<User>
/**
* @summary Logs user into the system
* @tag user
*/
get(url: '/user/login', options: SwaggerOptions<{}, {username?: string, password?: string}, {}, unknown>): Promise<string>
get(url: '/user/login', options?: SwaggerOptions<{}, {username?: string, password?: string}, {}, unknown>): Promise<string>
/**
* @summary Logs out current logged in user session
* @tag user
*/
get(url: '/user/logout', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<unknown>
get(url: '/user/logout', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<unknown>
/**
* @summary Get user by user name
* @tag user
Expand Down
4 changes: 2 additions & 2 deletions __test__/3.0/api-auth.ts
Expand Up @@ -62,7 +62,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand All @@ -84,7 +84,7 @@ export interface SwaggerApi {
* @summary 文件上传测试
* @tag auth-server-endpoint
*/
post(url: '/other', options: SwaggerOptions<{}, {name?: string}, {}, Blob | Uint8Array>): Promise<ResponseEntity>
post(url: '/other', options?: SwaggerOptions<{}, {name?: string}, {}, Blob | Uint8Array>): Promise<ResponseEntity>
/**
* @description oauth2.0 应用接入信息查询
* @summary 查询
Expand Down
16 changes: 8 additions & 8 deletions __test__/3.0/api-upms.ts
Expand Up @@ -218,7 +218,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand All @@ -240,22 +240,22 @@ export interface SwaggerApi {
* @summary 按钮
* @tag 公共接口
*/
get(url: '/button', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<MenuTreeVO>>
get(url: '/button', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<MenuTreeVO>>
/**
* @summary 导航条
* @tag 公共接口
*/
get(url: '/navbar', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<MenuTreeVO>>
get(url: '/navbar', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<MenuTreeVO>>
/**
* @summary 查询
* @tag 角色管理
*/
get(url: '/role', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<角色树查询>>
get(url: '/role', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<角色树查询>>
/**
* @summary 新增
* @tag 角色管理
*/
post(url: '/role', options: SwaggerOptions<{}, {}, {}, RoleDTO>): Promise<unknown>
post(url: '/role', options?: SwaggerOptions<{}, {}, {}, RoleDTO>): Promise<unknown>
/**
* @description 角色删除是一个危险的操作,不提供批量服务
* @summary 删除
Expand Down Expand Up @@ -295,18 +295,18 @@ export interface SwaggerApi {
* @summary 查询
* @tag 菜单管理
*/
get(url: '/sitemap', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<菜单树>>
get(url: '/sitemap', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<Array<菜单树>>
/**
* @description 添加菜单
* @summary 新增
* @tag 菜单管理
*/
post(url: '/sitemap', options: SwaggerOptions<{}, {}, {}, SitemapDTO>): Promise<unknown>
post(url: '/sitemap', options?: SwaggerOptions<{}, {}, {}, SitemapDTO>): Promise<unknown>
/**
* @summary 添加按钮
* @tag 菜单管理
*/
post(url: '/sitemap/button', options: SwaggerOptions<{}, {}, {}, ButtonDTO>): Promise<unknown>
post(url: '/sitemap/button', options?: SwaggerOptions<{}, {}, {}, ButtonDTO>): Promise<unknown>
/**
* @summary 修改按钮
* @tag 菜单管理
Expand Down
6 changes: 3 additions & 3 deletions __test__/3.0/api-with-examples.ts
Expand Up @@ -4,7 +4,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand All @@ -25,11 +25,11 @@ export interface SwaggerApi {
/**
* @summary List API versions
*/
get(url: '/', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<unknown>
get(url: '/', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<unknown>
/**
* @summary Show API version details
*/
get(url: '/v2', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<unknown>
get(url: '/v2', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<unknown>
}


Expand Down
2 changes: 1 addition & 1 deletion __test__/3.0/callback-example.ts
Expand Up @@ -4,7 +4,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand Down
2 changes: 1 addition & 1 deletion __test__/3.0/link-example.ts
Expand Up @@ -23,7 +23,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand Down
6 changes: 3 additions & 3 deletions __test__/3.0/petstore-expanded.ts
Expand Up @@ -21,7 +21,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand All @@ -44,11 +44,11 @@ export interface SwaggerApi {
* Nam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.
* Sed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.
*/
get(url: '/pets', options: SwaggerOptions<{}, {tags?: Array<string>, limit?: number}, {}, unknown>): Promise<Array<Pet>>
get(url: '/pets', options?: SwaggerOptions<{}, {tags?: Array<string>, limit?: number}, {}, unknown>): Promise<Array<Pet>>
/**
* @description Creates a new pet in the store. Duplicates are allowed
*/
post(url: '/pets', options: SwaggerOptions<{}, {}, {}, NewPet>): Promise<Pet>
post(url: '/pets', options?: SwaggerOptions<{}, {}, {}, NewPet>): Promise<Pet>
/**
* @description Returns a user based on a single ID, if the user does not have access to the pet
*/
Expand Down
4 changes: 2 additions & 2 deletions __test__/3.0/uspto.ts
Expand Up @@ -30,7 +30,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand All @@ -52,7 +52,7 @@ export interface SwaggerApi {
* @summary List available data sets
* @tag metadata
*/
get(url: '/', options: SwaggerOptions<{}, {}, {}, unknown>): Promise<dataSetList>
get(url: '/', options?: SwaggerOptions<{}, {}, {}, unknown>): Promise<dataSetList>
/**
* @description This GET API returns the list of all the searchable field names that are in the oa_citations. Please see the 'fields' attribute which returns an array of field names. Each field or a combination of fields can be searched using the syntax options shown below.
* @summary Provides the general information about the API and the list of fields that can be used to query the dataset.
Expand Down
2 changes: 1 addition & 1 deletion __test__/3.1/webhook-example.ts
Expand Up @@ -8,7 +8,7 @@ export type Stringify = string | number | null | undefined | void

export type SwaggerPath = Record<string, string | number>

export type SwaggerQuery = Record<string, Stringify | Stringify[]>
export type SwaggerQuery = Record<string, Stringify | Stringify[] | Record<string, any>>

export type SwaggerHeaders = Record<string, Stringify | Stringify[]>

Expand Down

0 comments on commit 53e1deb

Please sign in to comment.