forked from loafle/openapi-generator-original
[TypeScript] fix security features listed in documentation (#15751)
This commit is contained in:
parent
0d9ca8a2d5
commit
d2446013d1
@ -262,11 +262,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✓|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -247,7 +247,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✗|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✗|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✗|OAS2,OAS3
|
||||||
|
@ -255,11 +255,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✓|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -280,11 +280,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✓|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -253,11 +253,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✗|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -248,11 +248,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✗|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -257,11 +257,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✗|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -251,11 +251,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✓|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -272,11 +272,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✓|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -265,11 +265,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✗|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -256,11 +256,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
### Security Feature
|
### Security Feature
|
||||||
| Name | Supported | Defined By |
|
| Name | Supported | Defined By |
|
||||||
| ---- | --------- | ---------- |
|
| ---- | --------- | ---------- |
|
||||||
|BasicAuth|✗|OAS2,OAS3
|
|BasicAuth|✓|OAS2,OAS3
|
||||||
|ApiKey|✗|OAS2,OAS3
|
|ApiKey|✓|OAS2,OAS3
|
||||||
|OpenIDConnect|✗|OAS3
|
|OpenIDConnect|✗|OAS3
|
||||||
|BearerToken|✗|OAS3
|
|BearerToken|✓|OAS3
|
||||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
|OAuth2_Implicit|✓|OAS2,OAS3
|
||||||
|OAuth2_Password|✗|OAS2,OAS3
|
|OAuth2_Password|✗|OAS2,OAS3
|
||||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||||
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|
||||||
|
@ -256,8 +256,10 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
|||||||
modifyFeatureSet(features -> features
|
modifyFeatureSet(features -> features
|
||||||
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
||||||
.wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML))
|
.wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML))
|
||||||
.securityFeatures(EnumSet.noneOf(
|
.securityFeatures(EnumSet.of(
|
||||||
SecurityFeature.class
|
SecurityFeature.ApiKey,
|
||||||
|
SecurityFeature.BasicAuth,
|
||||||
|
SecurityFeature.OAuth2_Implicit
|
||||||
))
|
))
|
||||||
.excludeGlobalFeatures(
|
.excludeGlobalFeatures(
|
||||||
GlobalFeature.XMLStructureDefinitions,
|
GlobalFeature.XMLStructureDefinitions,
|
||||||
|
@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.Schema;
|
|||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
import org.openapitools.codegen.meta.features.GlobalFeature;
|
import org.openapitools.codegen.meta.features.GlobalFeature;
|
||||||
|
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationMap;
|
import org.openapitools.codegen.model.OperationMap;
|
||||||
@ -90,6 +91,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
|
|||||||
|
|
||||||
modifyFeatureSet(features -> features
|
modifyFeatureSet(features -> features
|
||||||
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
||||||
|
.includeSecurityFeatures(SecurityFeature.BearerToken)
|
||||||
.includeGlobalFeatures(GlobalFeature.ParameterStyling)
|
.includeGlobalFeatures(GlobalFeature.ParameterStyling)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
package org.openapitools.codegen.languages;
|
package org.openapitools.codegen.languages;
|
||||||
|
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
|
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationMap;
|
import org.openapitools.codegen.model.OperationMap;
|
||||||
@ -32,6 +34,10 @@ public class TypeScriptAureliaClientCodegen extends AbstractTypeScriptClientCode
|
|||||||
public TypeScriptAureliaClientCodegen() {
|
public TypeScriptAureliaClientCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
modifyFeatureSet(features -> features
|
||||||
|
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
||||||
|
.securityFeatures(EnumSet.of(SecurityFeature.ApiKey)));
|
||||||
|
|
||||||
apiTemplateFiles.put("api.mustache", ".ts");
|
apiTemplateFiles.put("api.mustache", ".ts");
|
||||||
|
|
||||||
// clear import mapping (from default generator) as TS does not use it
|
// clear import mapping (from default generator) as TS does not use it
|
||||||
|
@ -23,6 +23,7 @@ import io.swagger.v3.parser.util.SchemaTypeUtil;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
|
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationMap;
|
import org.openapitools.codegen.model.OperationMap;
|
||||||
@ -50,7 +51,9 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
|
|||||||
public TypeScriptAxiosClientCodegen() {
|
public TypeScriptAxiosClientCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
modifyFeatureSet(features -> features.includeDocumentationFeatures(DocumentationFeature.Readme));
|
modifyFeatureSet(features -> features
|
||||||
|
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
||||||
|
.includeSecurityFeatures(SecurityFeature.BearerToken));
|
||||||
|
|
||||||
// clear import mapping (from default generator) as TS does not use it
|
// clear import mapping (from default generator) as TS does not use it
|
||||||
// at the moment
|
// at the moment
|
||||||
|
@ -29,6 +29,8 @@ import org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE;
|
|||||||
import org.openapitools.codegen.CodegenDiscriminator.MappedModel;
|
import org.openapitools.codegen.CodegenDiscriminator.MappedModel;
|
||||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||||
import org.openapitools.codegen.meta.Stability;
|
import org.openapitools.codegen.meta.Stability;
|
||||||
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
|
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationMap;
|
import org.openapitools.codegen.model.OperationMap;
|
||||||
@ -89,6 +91,8 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp
|
|||||||
public TypeScriptClientCodegen() {
|
public TypeScriptClientCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
modifyFeatureSet(features -> features.includeSecurityFeatures(SecurityFeature.BearerToken));
|
||||||
|
|
||||||
this.frameworkToHttpLibMap = new HashMap<>();
|
this.frameworkToHttpLibMap = new HashMap<>();
|
||||||
this.frameworkToHttpLibMap.put("fetch-api", "isomorphic-fetch");
|
this.frameworkToHttpLibMap.put("fetch-api", "isomorphic-fetch");
|
||||||
this.frameworkToHttpLibMap.put("jquery", "jquery");
|
this.frameworkToHttpLibMap.put("jquery", "jquery");
|
||||||
|
@ -28,6 +28,7 @@ import io.swagger.v3.oas.models.servers.Server;
|
|||||||
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
|
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationMap;
|
import org.openapitools.codegen.model.OperationMap;
|
||||||
@ -80,7 +81,9 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
|||||||
public TypeScriptFetchClientCodegen() {
|
public TypeScriptFetchClientCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
modifyFeatureSet(features -> features.includeDocumentationFeatures(DocumentationFeature.Readme));
|
modifyFeatureSet(features -> features
|
||||||
|
.includeDocumentationFeatures(DocumentationFeature.Readme)
|
||||||
|
.includeSecurityFeatures(SecurityFeature.BearerToken));
|
||||||
|
|
||||||
// clear import mapping (from default generator) as TS does not use it
|
// clear import mapping (from default generator) as TS does not use it
|
||||||
// at the moment
|
// at the moment
|
||||||
|
@ -23,6 +23,8 @@ import io.swagger.v3.oas.models.media.Schema;
|
|||||||
import io.swagger.v3.oas.models.responses.ApiResponse;
|
import io.swagger.v3.oas.models.responses.ApiResponse;
|
||||||
|
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
|
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationMap;
|
import org.openapitools.codegen.model.OperationMap;
|
||||||
@ -51,6 +53,8 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen
|
|||||||
public TypeScriptNodeClientCodegen() {
|
public TypeScriptNodeClientCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
modifyFeatureSet(features -> features.includeSecurityFeatures(SecurityFeature.BearerToken));
|
||||||
|
|
||||||
typeMapping.put("file", "RequestFile");
|
typeMapping.put("file", "RequestFile");
|
||||||
// RequestFile is defined as: `type RequestFile = string | Buffer | ReadStream | RequestDetailedFile;`
|
// RequestFile is defined as: `type RequestFile = string | Buffer | ReadStream | RequestDetailedFile;`
|
||||||
languageSpecificPrimitives.add("Buffer");
|
languageSpecificPrimitives.add("Buffer");
|
||||||
|
@ -20,6 +20,8 @@ package org.openapitools.codegen.languages;
|
|||||||
import io.swagger.v3.oas.models.media.Schema;
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
|
import org.openapitools.codegen.meta.features.DocumentationFeature;
|
||||||
|
import org.openapitools.codegen.meta.features.SecurityFeature;
|
||||||
import org.openapitools.codegen.model.ModelMap;
|
import org.openapitools.codegen.model.ModelMap;
|
||||||
import org.openapitools.codegen.model.ModelsMap;
|
import org.openapitools.codegen.model.ModelsMap;
|
||||||
import org.openapitools.codegen.model.OperationsMap;
|
import org.openapitools.codegen.model.OperationsMap;
|
||||||
@ -45,6 +47,8 @@ public class TypeScriptReduxQueryClientCodegen extends AbstractTypeScriptClientC
|
|||||||
public TypeScriptReduxQueryClientCodegen() {
|
public TypeScriptReduxQueryClientCodegen() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
modifyFeatureSet(features -> features.includeSecurityFeatures(SecurityFeature.BearerToken));
|
||||||
|
|
||||||
// clear import mapping (from default generator) as TS does not use it
|
// clear import mapping (from default generator) as TS does not use it
|
||||||
// at the moment
|
// at the moment
|
||||||
importMapping.clear();
|
importMapping.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user