forked from loafle/openapi-generator-original
Merge branches 'feature/integration-test' and 'master' of https://github.com/Vrolijkx/swagger-codegen
# Conflicts: # modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java
This commit is contained in:
commit
9070f1a0af
@ -6,8 +6,27 @@ import java.util.Map;
|
|||||||
import io.swagger.codegen.auth.AuthMethod;
|
import io.swagger.codegen.auth.AuthMethod;
|
||||||
|
|
||||||
public class ClientOpts {
|
public class ClientOpts {
|
||||||
|
protected String uri;
|
||||||
|
protected String target;
|
||||||
protected AuthMethod auth;
|
protected AuthMethod auth;
|
||||||
protected Map<String, String> properties = new HashMap<String, String>();
|
protected Map<String, String> properties = new HashMap<String, String>();
|
||||||
|
protected String outputDirectory;
|
||||||
|
|
||||||
|
public String getUri() {
|
||||||
|
return uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUri(String uri) {
|
||||||
|
this.uri = uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTarget() {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTarget(String target) {
|
||||||
|
this.target = target;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, String> getProperties() {
|
public Map<String, String> getProperties() {
|
||||||
return properties;
|
return properties;
|
||||||
@ -17,10 +36,19 @@ public class ClientOpts {
|
|||||||
this.properties = properties;
|
this.properties = properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOutputDirectory() {
|
||||||
|
return outputDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOutputDirectory(String outputDirectory) {
|
||||||
|
this.outputDirectory = outputDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("ClientOpts: {\n");
|
sb.append("ClientOpts: {\n");
|
||||||
|
sb.append(" uri: ").append(uri).append(",");
|
||||||
sb.append(" auth: ").append(auth).append(",");
|
sb.append(" auth: ").append(auth).append(",");
|
||||||
sb.append(properties);
|
sb.append(properties);
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
@ -29,20 +57,30 @@ public class ClientOpts {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) { return true; }
|
if (this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) { return false; }
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
ClientOpts that = (ClientOpts) o;
|
ClientOpts that = (ClientOpts) o;
|
||||||
|
|
||||||
if (auth != null ? !auth.equals(that.auth) : that.auth != null) { return false; }
|
if (uri != null ? !uri.equals(that.uri) : that.uri != null)
|
||||||
return getProperties().equals(that.getProperties());
|
return false;
|
||||||
|
if (target != null ? !target.equals(that.target) : that.target != null)
|
||||||
|
return false;
|
||||||
|
if (auth != null ? !auth.equals(that.auth) : that.auth != null)
|
||||||
|
return false;
|
||||||
|
if (properties != null ? !properties.equals(that.properties) : that.properties != null)
|
||||||
|
return false;
|
||||||
|
return outputDirectory != null ? outputDirectory.equals(that.outputDirectory) : that.outputDirectory == null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int result = auth != null ? auth.hashCode() : 0;
|
int result = uri != null ? uri.hashCode() : 0;
|
||||||
result = 31 * result + getProperties().hashCode();
|
result = 31 * result + (target != null ? target.hashCode() : 0);
|
||||||
|
result = 31 * result + (auth != null ? auth.hashCode() : 0);
|
||||||
|
result = 31 * result + (properties != null ? properties.hashCode() : 0);
|
||||||
|
result = 31 * result + (outputDirectory != null ? outputDirectory.hashCode() : 0);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,8 @@ public class CodegenModel {
|
|||||||
public ExternalDocs externalDocs;
|
public ExternalDocs externalDocs;
|
||||||
|
|
||||||
public Map<String, Object> vendorExtensions;
|
public Map<String, Object> vendorExtensions;
|
||||||
|
|
||||||
|
//The type of the value from additional properties. Used in map like objects.
|
||||||
public String additionalPropertiesType;
|
public String additionalPropertiesType;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod
|
|||||||
@Override
|
@Override
|
||||||
public void postProcessParameter(CodegenParameter parameter) {
|
public void postProcessParameter(CodegenParameter parameter) {
|
||||||
super.postProcessParameter(parameter);
|
super.postProcessParameter(parameter);
|
||||||
parameter.dataType = addModelPrefix(parameter.dataType);
|
parameter.dataType = addModelPrefix(parameter.dataType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNpmName() {
|
public String getNpmName() {
|
||||||
|
@ -944,6 +944,22 @@ definitions:
|
|||||||
enum:
|
enum:
|
||||||
- 1.1
|
- 1.1
|
||||||
- -1.2
|
- -1.2
|
||||||
|
AdditionalPropertiesClass:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
MixedPropertiesAndAdditionalPropertiesClass:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
uuid:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
dateTime:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
$ref: '#/definitions/Animal'
|
||||||
externalDocs:
|
externalDocs:
|
||||||
description: Find out more about Swagger
|
description: Find out more about Swagger
|
||||||
url: 'http://swagger.io'
|
url: 'http://swagger.io'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user