Skip to content

Commit 9842a86

Browse files
committed
update samples
1 parent 33fbbb4 commit 9842a86

5 files changed

Lines changed: 172 additions & 0 deletions

File tree

samples/client/others/typescript-fetch/infinite-recursion-issue/.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
apis/TestApi.ts
22
apis/index.ts
3+
docs/ExtendDto.md
4+
docs/TestApi.md
5+
docs/TestBaseDto.md
6+
docs/TestObjectType.md
37
index.ts
48
models/ExtendDto.ts
59
models/TestBaseDto.ts
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
# ExtendDto
3+
4+
5+
## Properties
6+
7+
Name | Type
8+
------------ | -------------
9+
`someItems` | [Array<TestBaseDto>](TestBaseDto.md)
10+
11+
## Example
12+
13+
```typescript
14+
import type { ExtendDto } from ''
15+
16+
// TODO: Update the object below with actual values
17+
const example = {
18+
"someItems": null,
19+
} satisfies ExtendDto
20+
21+
console.log(example)
22+
23+
// Convert the instance to a JSON string
24+
const exampleJSON: string = JSON.stringify(example)
25+
console.log(exampleJSON)
26+
27+
// Parse the JSON string back to an object
28+
const exampleParsed = JSON.parse(exampleJSON) as ExtendDto
29+
console.log(exampleParsed)
30+
```
31+
32+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33+
34+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# TestApi
2+
3+
All URIs are relative to *http://localhost:8080*
4+
5+
| Method | HTTP request | Description |
6+
|------------- | ------------- | -------------|
7+
| [**test**](TestApi.md#test) | **GET** /api/v1/test | |
8+
9+
10+
11+
## test
12+
13+
> Array<TestBaseDto> test()
14+
15+
16+
17+
### Example
18+
19+
```ts
20+
import {
21+
Configuration,
22+
TestApi,
23+
} from '';
24+
import type { TestRequest } from '';
25+
26+
async function example() {
27+
console.log("🚀 Testing SDK...");
28+
const api = new TestApi();
29+
30+
try {
31+
const data = await api.test();
32+
console.log(data);
33+
} catch (error) {
34+
console.error(error);
35+
}
36+
}
37+
38+
// Run the test
39+
example().catch(console.error);
40+
```
41+
42+
### Parameters
43+
44+
This endpoint does not need any parameter.
45+
46+
### Return type
47+
48+
[**Array<TestBaseDto>**](TestBaseDto.md)
49+
50+
### Authorization
51+
52+
No authorization required
53+
54+
### HTTP request headers
55+
56+
- **Content-Type**: Not defined
57+
- **Accept**: `application/json`
58+
59+
60+
### HTTP response details
61+
| Status code | Description | Response headers |
62+
|-------------|-------------|------------------|
63+
| **200** | test operation | - |
64+
65+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
66+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
# TestBaseDto
3+
4+
5+
## Properties
6+
7+
Name | Type
8+
------------ | -------------
9+
`something` | string
10+
`testObjectType` | [TestObjectType](TestObjectType.md)
11+
12+
## Example
13+
14+
```typescript
15+
import type { TestBaseDto } from ''
16+
17+
// TODO: Update the object below with actual values
18+
const example = {
19+
"something": null,
20+
"testObjectType": null,
21+
} satisfies TestBaseDto
22+
23+
console.log(example)
24+
25+
// Convert the instance to a JSON string
26+
const exampleJSON: string = JSON.stringify(example)
27+
console.log(exampleJSON)
28+
29+
// Parse the JSON string back to an object
30+
const exampleParsed = JSON.parse(exampleJSON) as TestBaseDto
31+
console.log(exampleParsed)
32+
```
33+
34+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35+
36+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# TestObjectType
3+
4+
5+
## Properties
6+
7+
Name | Type
8+
------------ | -------------
9+
10+
## Example
11+
12+
```typescript
13+
import type { TestObjectType } from ''
14+
15+
// TODO: Update the object below with actual values
16+
const example = {
17+
} satisfies TestObjectType
18+
19+
console.log(example)
20+
21+
// Convert the instance to a JSON string
22+
const exampleJSON: string = JSON.stringify(example)
23+
console.log(exampleJSON)
24+
25+
// Parse the JSON string back to an object
26+
const exampleParsed = JSON.parse(exampleJSON) as TestObjectType
27+
console.log(exampleParsed)
28+
```
29+
30+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
31+
32+

0 commit comments

Comments
 (0)