Skip to content

Commit 6652afe

Browse files
committed
add typescript-axios-slim generator
1 parent 44bc527 commit 6652afe

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
3+
* Copyright 2018 SmartBear Software
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.openapitools.codegen.languages;
19+
20+
public class TypeScriptAxiosSlimClientCodegen extends TypeScriptAxiosClientCodegen {
21+
22+
public TypeScriptAxiosSlimClientCodegen() {
23+
super();
24+
outputFolder = "generated-code/typescript-axios-slim";
25+
embeddedTemplateDir = templateDir = "typescript-axios-slim";
26+
additionalProperties.put(USE_SINGLE_REQUEST_PARAMETER, true);
27+
}
28+
29+
@Override
30+
public void processOpts() {
31+
additionalProperties.put(USE_SINGLE_REQUEST_PARAMETER, true);
32+
super.processOpts();
33+
additionalProperties.put(USE_SINGLE_REQUEST_PARAMETER, true);
34+
}
35+
36+
@Override
37+
public String getName() {
38+
return "typescript-axios-slim";
39+
}
40+
41+
@Override
42+
public String getHelp() {
43+
return "Generates a TypeScript client library using axios (slim direct API style with valibot validation).";
44+
}
45+
}

modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ org.openapitools.codegen.languages.TypeScriptClientCodegen
154154
org.openapitools.codegen.languages.TypeScriptAngularClientCodegen
155155
org.openapitools.codegen.languages.TypeScriptAureliaClientCodegen
156156
org.openapitools.codegen.languages.TypeScriptAxiosClientCodegen
157+
org.openapitools.codegen.languages.TypeScriptAxiosSlimClientCodegen
157158
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
158159
org.openapitools.codegen.languages.TypeScriptInversifyClientCodegen
159160
org.openapitools.codegen.languages.TypeScriptJqueryClientCodegen

0 commit comments

Comments
 (0)