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;
|
||||
|
||||
public class ClientOpts {
|
||||
protected String uri;
|
||||
protected String target;
|
||||
protected AuthMethod auth;
|
||||
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() {
|
||||
return properties;
|
||||
@ -17,10 +36,19 @@ public class ClientOpts {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public String getOutputDirectory() {
|
||||
return outputDirectory;
|
||||
}
|
||||
|
||||
public void setOutputDirectory(String outputDirectory) {
|
||||
this.outputDirectory = outputDirectory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("ClientOpts: {\n");
|
||||
sb.append(" uri: ").append(uri).append(",");
|
||||
sb.append(" auth: ").append(auth).append(",");
|
||||
sb.append(properties);
|
||||
sb.append("}");
|
||||
@ -29,20 +57,30 @@ public class ClientOpts {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) { return true; }
|
||||
if (o == null || getClass() != o.getClass()) { return false; }
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
ClientOpts that = (ClientOpts) o;
|
||||
|
||||
if (auth != null ? !auth.equals(that.auth) : that.auth != null) { return false; }
|
||||
return getProperties().equals(that.getProperties());
|
||||
if (uri != null ? !uri.equals(that.uri) : that.uri != null)
|
||||
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
|
||||
public int hashCode() {
|
||||
int result = auth != null ? auth.hashCode() : 0;
|
||||
result = 31 * result + getProperties().hashCode();
|
||||
int result = uri != null ? uri.hashCode() : 0;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ public class CodegenModel {
|
||||
public ExternalDocs externalDocs;
|
||||
|
||||
public Map<String, Object> vendorExtensions;
|
||||
|
||||
//The type of the value from additional properties. Used in map like objects.
|
||||
public String additionalPropertiesType;
|
||||
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod
|
||||
@Override
|
||||
public void postProcessParameter(CodegenParameter parameter) {
|
||||
super.postProcessParameter(parameter);
|
||||
parameter.dataType = addModelPrefix(parameter.dataType);
|
||||
parameter.dataType = addModelPrefix(parameter.dataType);
|
||||
}
|
||||
|
||||
public String getNpmName() {
|
||||
|
@ -944,6 +944,22 @@ definitions:
|
||||
enum:
|
||||
- 1.1
|
||||
- -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:
|
||||
description: Find out more about Swagger
|
||||
url: 'http://swagger.io'
|
||||
|
Loading…
x
Reference in New Issue
Block a user