File tree Expand file tree Collapse file tree 9 files changed +2
-149
lines changed
modules/openapi-generator/src/main
java/org/openapitools/codegen/languages
resources/typescript-fetch
samples/client/petstore/typescript-fetch/builds/without-runtime-checks Expand file tree Collapse file tree 9 files changed +2
-149
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,6 @@ public TypeScriptFetchClientCodegen() {
113113 embeddedTemplateDir = templateDir = "typescript-fetch" ;
114114
115115 this .apiTemplateFiles .put ("apis.mustache" , ".ts" );
116- this .modelTemplateFiles .put ("models.mustache" , ".ts" );
117-
118116 this .apiDocTemplateFiles .put ("api_doc.mustache" , ".md" );
119117 this .modelDocTemplateFiles .put ("model_doc.mustache" , ".md" );
120118
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Name | Type
1111{ {#vars} }`{ {name} }` | { {#isPrimitiveType} }{ {dataType} }{ {/isPrimitiveType} }{ {^isPrimitiveType} }[{ {dataType} }]({ {complexType} }.md){ {/isPrimitiveType} }
1212{ {/vars} }
1313
14+ { {^withoutRuntimeChecks} }
1415## Example
1516
1617```typescript
@@ -33,6 +34,7 @@ console.log(exampleJSON)
3334const exampleParsed = JSON.parse(exampleJSON) as { {classname} }
3435console.log(exampleParsed)
3536```
37+ { {/withoutRuntimeChecks} }
3638
3739[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
3840
Original file line number Diff line number Diff line change @@ -16,12 +16,6 @@ src/apis/StoreApi.ts
1616src/apis/UserApi.ts
1717src/apis/index.ts
1818src/index.ts
19- src/models/Category.ts
20- src/models/ModelApiResponse.ts
21- src/models/Order.ts
22- src/models/Pet.ts
23- src/models/Tag.ts
24- src/models/User.ts
2519src/models/index.ts
2620src/runtime.ts
2721tsconfig.json
Original file line number Diff line number Diff line change @@ -10,27 +10,6 @@ Name | Type
1010` id ` | number
1111` name ` | string
1212
13- ## Example
14-
15- ``` typescript
16- import type { Category } from ' @openapitools/typescript-fetch-petstore'
17-
18- // TODO: Update the object below with actual values
19- const example = {
20- " id" : null ,
21- " name" : null ,
22- } satisfies Category
23-
24- console .log (example )
25-
26- // Convert the instance to a JSON string
27- const exampleJSON: string = JSON .stringify (example )
28- console .log (exampleJSON )
29-
30- // Parse the JSON string back to an object
31- const exampleParsed = JSON .parse (exampleJSON ) as Category
32- console .log (exampleParsed )
33- ```
3413
3514[[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#api-endpoints ) [[ Back to Model list]] ( ../README.md#models ) [[ Back to README]] ( ../README.md )
3615
Original file line number Diff line number Diff line change @@ -11,28 +11,6 @@ Name | Type
1111` type ` | string
1212` message ` | string
1313
14- ## Example
15-
16- ``` typescript
17- import type { ModelApiResponse } from ' @openapitools/typescript-fetch-petstore'
18-
19- // TODO: Update the object below with actual values
20- const example = {
21- " code" : null ,
22- " type" : null ,
23- " message" : null ,
24- } satisfies ModelApiResponse
25-
26- console .log (example )
27-
28- // Convert the instance to a JSON string
29- const exampleJSON: string = JSON .stringify (example )
30- console .log (exampleJSON )
31-
32- // Parse the JSON string back to an object
33- const exampleParsed = JSON .parse (exampleJSON ) as ModelApiResponse
34- console .log (exampleParsed )
35- ```
3614
3715[[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#api-endpoints ) [[ Back to Model list]] ( ../README.md#models ) [[ Back to README]] ( ../README.md )
3816
Original file line number Diff line number Diff line change @@ -14,31 +14,6 @@ Name | Type
1414` status ` | string
1515` complete ` | boolean
1616
17- ## Example
18-
19- ``` typescript
20- import type { Order } from ' @openapitools/typescript-fetch-petstore'
21-
22- // TODO: Update the object below with actual values
23- const example = {
24- " id" : null ,
25- " petId" : null ,
26- " quantity" : null ,
27- " shipDate" : null ,
28- " status" : null ,
29- " complete" : null ,
30- } satisfies Order
31-
32- console .log (example )
33-
34- // Convert the instance to a JSON string
35- const exampleJSON: string = JSON .stringify (example )
36- console .log (exampleJSON )
37-
38- // Parse the JSON string back to an object
39- const exampleParsed = JSON .parse (exampleJSON ) as Order
40- console .log (exampleParsed )
41- ```
4217
4318[[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#api-endpoints ) [[ Back to Model list]] ( ../README.md#models ) [[ Back to README]] ( ../README.md )
4419
Original file line number Diff line number Diff line change @@ -14,31 +14,6 @@ Name | Type
1414` tags ` | [ Array< ; Tag> ; ] ( Tag.md )
1515` status ` | string
1616
17- ## Example
18-
19- ``` typescript
20- import type { Pet } from ' @openapitools/typescript-fetch-petstore'
21-
22- // TODO: Update the object below with actual values
23- const example = {
24- " id" : null ,
25- " category" : null ,
26- " name" : doggie ,
27- " photoUrls" : null ,
28- " tags" : null ,
29- " status" : null ,
30- } satisfies Pet
31-
32- console .log (example )
33-
34- // Convert the instance to a JSON string
35- const exampleJSON: string = JSON .stringify (example )
36- console .log (exampleJSON )
37-
38- // Parse the JSON string back to an object
39- const exampleParsed = JSON .parse (exampleJSON ) as Pet
40- console .log (exampleParsed )
41- ```
4217
4318[[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#api-endpoints ) [[ Back to Model list]] ( ../README.md#models ) [[ Back to README]] ( ../README.md )
4419
Original file line number Diff line number Diff line change @@ -10,27 +10,6 @@ Name | Type
1010` id ` | number
1111` name ` | string
1212
13- ## Example
14-
15- ``` typescript
16- import type { Tag } from ' @openapitools/typescript-fetch-petstore'
17-
18- // TODO: Update the object below with actual values
19- const example = {
20- " id" : null ,
21- " name" : null ,
22- } satisfies Tag
23-
24- console .log (example )
25-
26- // Convert the instance to a JSON string
27- const exampleJSON: string = JSON .stringify (example )
28- console .log (exampleJSON )
29-
30- // Parse the JSON string back to an object
31- const exampleParsed = JSON .parse (exampleJSON ) as Tag
32- console .log (exampleParsed )
33- ```
3413
3514[[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#api-endpoints ) [[ Back to Model list]] ( ../README.md#models ) [[ Back to README]] ( ../README.md )
3615
Original file line number Diff line number Diff line change @@ -16,33 +16,6 @@ Name | Type
1616` phone ` | string
1717` userStatus ` | number
1818
19- ## Example
20-
21- ``` typescript
22- import type { User } from ' @openapitools/typescript-fetch-petstore'
23-
24- // TODO: Update the object below with actual values
25- const example = {
26- " id" : null ,
27- " username" : null ,
28- " firstName" : null ,
29- " lastName" : null ,
30- " email" : null ,
31- " password" : null ,
32- " phone" : null ,
33- " userStatus" : null ,
34- } satisfies User
35-
36- console .log (example )
37-
38- // Convert the instance to a JSON string
39- const exampleJSON: string = JSON .stringify (example )
40- console .log (exampleJSON )
41-
42- // Parse the JSON string back to an object
43- const exampleParsed = JSON .parse (exampleJSON ) as User
44- console .log (exampleParsed )
45- ```
4619
4720[[ Back to top]] ( # ) [[ Back to API list]] ( ../README.md#api-endpoints ) [[ Back to Model list]] ( ../README.md#models ) [[ Back to README]] ( ../README.md )
4821
You can’t perform that action at this time.
0 commit comments