mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 12:10:54 +00:00
[Java] Fixes schema class type booleans for composed schemas (#10334)
* Adds get/setIsString interface to IJsonSchemaValidationProperties * Adds get/set isNumber interface in IJsonSchemaValidationProperties * Adds get/set isAnyType in IJsonSchemaValidationProperties * Adds and uses ModelUtils.isAnyType, adds setTypeProperties * Adds missing descriptions of isAnyType parameters * Uses ModelUtils.isAnyType * Samples regenerated * Moves isArray handling higher up in fromProperty * Moves isAnyTypeSchema handling higher up in fromProperty * Moves isFreeFormObject handling higher up in fromProperty * Refactors fromProperties, updates tests * Fixes the fromProperty refactor, tests now pass * Uses setTypeProperties to set isNumber, isNull, isArray, and isUnboundedInteger * Sets isAnyType in setTypeProperties * Sets isMap in setTypeProperties * Sets property.isPrimitiveType in isFreeFormObject, tweaks if condition order * Adds fix for JavaClientCodegenTest.testJdkHttpClientWithAndWithoutDiscriminator * Refactors fromProperty * Adds updatePropertyForObject updatePropertyForAnyType * Sets binary and file types to not be strings * Updates samples * Adds updatePropertyForString * Adds testComposedPropertyTypes * Fixes python test * Samples updated * Switches all isAnyTypeSchema usages to ModelUtils.isAnyType * Refactors model enum handling higher up * Moves m.dataType assignent higher into fromModel * Moves m.isNullable setting higher into isModel * Adds updateModelForComposedSchema * Further fromModel refactoring, all schema checks are now at the same indentation level * Further refactors fromModel, adds isTypeObjectSchema block * Moves addVars into anyType or objectType blocks in fromModel * Turns off isNullable n isAnyType array * Fixes typescript CodegenParameers * Adds updatePropertyForAnyType to typescript-axios so property.isNullable will be false for AnyType * Adds testComposedModelTypes * Updates ComposedAnyType schema * Fixes tests for JavaJAXRSCXF by adding updateModelForObject method * Updates go and csharp to handle object model differently * Adds updateModelForAnyType * Fixes name reference * Adds testComposedResponseTypes * Refactoring fromResponse * Further refactoring of fromResponse * Uses setTypeProperties in fromResponse * Tests now pass for testComposedResponseTypes * Sets COdegenResponse dataType using getTypeDeclaration * Begins refactoring of fromRequestBody * Adds updateResponseBodyForPrimitiveType * Adds all needed type if else blocks in fromRequestBody * Fixes JavaJAXRSCXFExtServerCodegenTests * Fixes RubyClientCodegenTests * Adds fixes for clients that need custom isMap for body parameters * Ruby broken, samples regened, debugging * Adds updateRequestBodyForArray, renames updateRequest.. methods * Samples regenerated * Removes changes from Ruby generator * Reverts RubyClientCodegen.java * Reverts changes to GoClientCodegen.java * Reverts PowerShellClientCodegen.java * Reverts CrystalClientCodegen.java * Removes updateRequestBodyForObject from JavaCXFServerCodegen.java * Adds comment about refed models * Tweaks made to fromProperties to add an explanatory comment * Updates RustServer to have ByteArray request bodies not be strings * Sets types in fromFormProperty * Adds testComposedRequestBodyTypes * Fixes when validation syncing is done in syncValidationProperties * Removes redundant validation code from fromParameter * Moves parameter inX setting higher up before schema logic in fromParameter * More refactoring in fromParameter, uses early return to reduce levels of indentation * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForArray * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForObject * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForPrimitiveType * Removes setParameterBooleanFlagWithCodegenProperty from updateRequestBodyForMap * Removes setParameterBooleanFlagWithCodegenProperty from addBodyModelSchema * Removes setParameterBooleanFlagWithCodegenProperty from fromFormProperty * Refactors parameter array handling code into fromFormProperty * Simplifies fromRequestBodyToFormParameters * Removes setParameterBooleanFlagWithCodegenProperty from fromParameter * Adds deprecated docstring to setParameterBooleanFlagWithCodegenProperty * Refactors ModelUtils.isFileSchema out of string schema check * Removes ModelUtils.isFileSchema from RustServer updateRequestBodyForString * Improves comment text * Fixes RustServer uuid type setting for CodegenParameter * Removes unneeded parens * Fixes array property examples * Removes unused code * Renames variable to itemsProperty * Adds testComposedRequestQueryParamTypes * Adds updatePropertyForAnyType to rustserver will not have changed model properties * Hoists arrayInnerProperty._enum into parameter for html2 generator * Moves turning string type off into the codegen files * Adds two more missing locations in rustserver * Moves addVarsRequiredVarsAdditionalProps into anytype and objecttype handling * More refactoring of where addVarsRequiredVarsAdditionalProps is used * Samples regenerated
This commit is contained in:
parent
60b29e1f8e
commit
d4b8ff60a1
@ -161,6 +161,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
|||||||
private boolean isModel;
|
private boolean isModel;
|
||||||
private boolean hasRequiredVars;
|
private boolean hasRequiredVars;
|
||||||
private boolean hasDiscriminatorWithNonEmptyMapping;
|
private boolean hasDiscriminatorWithNonEmptyMapping;
|
||||||
|
private boolean isAnyType;
|
||||||
|
|
||||||
public String getAdditionalPropertiesType() {
|
public String getAdditionalPropertiesType() {
|
||||||
return additionalPropertiesType;
|
return additionalPropertiesType;
|
||||||
@ -785,6 +786,30 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
|||||||
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsString() { return isString; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsString(boolean isString) {
|
||||||
|
this.isString = isString;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsNumber() { return isNumber; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsNumber(boolean isNumber) {
|
||||||
|
this.isNumber = isNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsAnyType() { return isAnyType; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsAnyType(boolean isAnyType) {
|
||||||
|
this.isAnyType = isAnyType;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
@ -819,6 +844,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
|||||||
isNull == that.isNull &&
|
isNull == that.isNull &&
|
||||||
hasValidation == that.hasValidation &&
|
hasValidation == that.hasValidation &&
|
||||||
hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() &&
|
hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() &&
|
||||||
|
getIsAnyType() == that.getIsAnyType() &&
|
||||||
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
|
getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
|
||||||
getUniqueItems() == that.getUniqueItems() &&
|
getUniqueItems() == that.getUniqueItems() &&
|
||||||
getExclusiveMinimum() == that.getExclusiveMinimum() &&
|
getExclusiveMinimum() == that.getExclusiveMinimum() &&
|
||||||
@ -895,7 +921,8 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
|||||||
getAdditionalPropertiesType(), getMaxProperties(), getMinProperties(), getUniqueItems(), getMaxItems(),
|
getAdditionalPropertiesType(), getMaxProperties(), getMinProperties(), getUniqueItems(), getMaxItems(),
|
||||||
getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(),
|
getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(),
|
||||||
getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(),
|
getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(),
|
||||||
getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping, anyOfProps, oneOfProps, allOfProps);
|
getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping, anyOfProps, oneOfProps, allOfProps,
|
||||||
|
isAnyType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -989,6 +1016,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
|
|||||||
sb.append(", hasValidation='").append(hasValidation);
|
sb.append(", hasValidation='").append(hasValidation);
|
||||||
sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType());
|
sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType());
|
||||||
sb.append(", getHasDiscriminatorWithNonEmptyMapping=").append(hasDiscriminatorWithNonEmptyMapping);
|
sb.append(", getHasDiscriminatorWithNonEmptyMapping=").append(hasDiscriminatorWithNonEmptyMapping);
|
||||||
|
sb.append(", getIsAnyType=").append(getIsAnyType());
|
||||||
sb.append('}');
|
sb.append('}');
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -682,5 +682,29 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping) {
|
public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping) {
|
||||||
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsString() { return isString; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsString(boolean isString) {
|
||||||
|
this.isString = isString;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsNumber() { return isNumber; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsNumber(boolean isNumber) {
|
||||||
|
this.isNumber = isNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsAnyType() { return isAnyType; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsAnyType(boolean isAnyType) {
|
||||||
|
this.isAnyType = isAnyType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -763,6 +763,30 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
|||||||
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsString() { return isString; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsString(boolean isString) {
|
||||||
|
this.isString = isString;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsNumber() { return isNumber; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsNumber(boolean isNumber) {
|
||||||
|
this.isNumber = isNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsAnyType() { return isAnyType; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsAnyType(boolean isAnyType) {
|
||||||
|
this.isAnyType = isAnyType;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder sb = new StringBuilder("CodegenProperty{");
|
final StringBuilder sb = new StringBuilder("CodegenProperty{");
|
||||||
|
@ -546,4 +546,28 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
|||||||
public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping) {
|
public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping) {
|
||||||
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsString() { return isString; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsString(boolean isString) {
|
||||||
|
this.isString = isString;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsNumber() { return isNumber; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsNumber(boolean isNumber) {
|
||||||
|
this.isNumber = isNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getIsAnyType() { return isAnyType; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIsAnyType(boolean isAnyType) {
|
||||||
|
this.isAnyType = isAnyType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,9 @@ package org.openapitools.codegen;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
|
|
||||||
public interface IJsonSchemaValidationProperties {
|
public interface IJsonSchemaValidationProperties {
|
||||||
String getPattern();
|
String getPattern();
|
||||||
|
|
||||||
@ -71,6 +74,7 @@ public interface IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
void setIsDateTime(boolean isDateTime);
|
void setIsDateTime(boolean isDateTime);
|
||||||
|
|
||||||
|
// true when the schema type is object
|
||||||
boolean getIsMap();
|
boolean getIsMap();
|
||||||
|
|
||||||
void setIsMap(boolean isMap);
|
void setIsMap(boolean isMap);
|
||||||
@ -128,4 +132,77 @@ public interface IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
// discriminators are only supported in request bodies and response payloads per OpenApi
|
// discriminators are only supported in request bodies and response payloads per OpenApi
|
||||||
void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping);
|
void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping);
|
||||||
|
|
||||||
|
boolean getIsString();
|
||||||
|
|
||||||
|
void setIsString(boolean isNumber);
|
||||||
|
|
||||||
|
boolean getIsNumber();
|
||||||
|
|
||||||
|
void setIsNumber(boolean isNumber);
|
||||||
|
|
||||||
|
boolean getIsAnyType();
|
||||||
|
|
||||||
|
void setIsAnyType(boolean isAnyType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Syncs all the schema's type properties into the IJsonSchemaValidationProperties instance
|
||||||
|
* for now this only supports types without format information
|
||||||
|
* TODO: in the future move the format handling in here too
|
||||||
|
* @param p the schema which contains the type info
|
||||||
|
*/
|
||||||
|
default void setTypeProperties(Schema p) {
|
||||||
|
if (ModelUtils.isTypeObjectSchema(p)) {
|
||||||
|
setIsMap(true);
|
||||||
|
} else if (ModelUtils.isArraySchema(p)) {
|
||||||
|
setIsArray(true);
|
||||||
|
} else if (ModelUtils.isFileSchema(p) && !ModelUtils.isStringSchema(p)) {
|
||||||
|
// swagger v2 only, type file
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isStringSchema(p)) {
|
||||||
|
setIsString(true);
|
||||||
|
if (ModelUtils.isByteArraySchema(p)) {
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isBinarySchema(p)) {
|
||||||
|
// openapi v3 way of representing binary + file data
|
||||||
|
// for backward compatibility with 2.x file type
|
||||||
|
setIsString(false);
|
||||||
|
} else if (ModelUtils.isUUIDSchema(p)) {
|
||||||
|
// keep isString to true to make it backward compatible
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isURISchema(p)) {
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isEmailSchema(p)) {
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isDateSchema(p)) {
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isDateTimeSchema(p)) {
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number
|
||||||
|
;
|
||||||
|
}
|
||||||
|
} else if (ModelUtils.isNumberSchema(p)) {
|
||||||
|
if (ModelUtils.isFloatSchema(p)) { // float
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isDoubleSchema(p)) { // double
|
||||||
|
;
|
||||||
|
} else { // type is number and without format
|
||||||
|
setIsNumber(true);
|
||||||
|
}
|
||||||
|
} else if (ModelUtils.isIntegerSchema(p)) { // integer type
|
||||||
|
if (ModelUtils.isLongSchema(p)) { // int64/long format
|
||||||
|
;
|
||||||
|
} else if (ModelUtils.isShortSchema(p)) { // int32/short format
|
||||||
|
;
|
||||||
|
} else { // unbounded integer
|
||||||
|
setIsUnboundedInteger(true);
|
||||||
|
}
|
||||||
|
} else if (ModelUtils.isBooleanSchema(p)) { // boolean type
|
||||||
|
setIsBoolean(true);
|
||||||
|
} else if (ModelUtils.isNullType(p)) {
|
||||||
|
setIsNull(true);
|
||||||
|
} else if (ModelUtils.isAnyType(p)) {
|
||||||
|
setIsAnyType(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -401,7 +401,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
|
|
||||||
if (ref != null && !ref.isEmpty()) {
|
if (ref != null && !ref.isEmpty()) {
|
||||||
type = toModelName(openAPIType);
|
type = toModelName(openAPIType);
|
||||||
} else if ("object".equals(openAPIType) && isAnyTypeSchema(p)) {
|
} else if ("object".equals(openAPIType) && ModelUtils.isAnyType(p)) {
|
||||||
// Arbitrary type. Note this is not the same thing as free-form object.
|
// Arbitrary type. Note this is not the same thing as free-form object.
|
||||||
type = "interface{}";
|
type = "interface{}";
|
||||||
} else if (typeMapping.containsKey(openAPIType)) {
|
} else if (typeMapping.containsKey(openAPIType)) {
|
||||||
|
@ -19,6 +19,7 @@ package org.openapitools.codegen.languages;
|
|||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.samskivert.mustache.Mustache;
|
import com.samskivert.mustache.Mustache;
|
||||||
import io.swagger.v3.oas.models.media.ArraySchema;
|
import io.swagger.v3.oas.models.media.ArraySchema;
|
||||||
|
import io.swagger.v3.oas.models.media.ComposedSchema;
|
||||||
import io.swagger.v3.oas.models.media.Schema;
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.meta.features.*;
|
import org.openapitools.codegen.meta.features.*;
|
||||||
@ -1128,4 +1129,28 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
|||||||
System.out.println("# Please support his work directly via https://patreon.com/jimschubert \uD83D\uDE4F #");
|
System.out.println("# Please support his work directly via https://patreon.com/jimschubert \uD83D\uDE4F #");
|
||||||
System.out.println("################################################################################");
|
System.out.println("################################################################################");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateModelForObject(CodegenModel m, Schema schema) {
|
||||||
|
/**
|
||||||
|
* we have a custom version of this function so we only set isMap to true if
|
||||||
|
* ModelUtils.isMapSchema
|
||||||
|
* In other generators, isMap is true for all type object schemas
|
||||||
|
*/
|
||||||
|
if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) {
|
||||||
|
// passing null to allProperties and allRequired as there's no parent
|
||||||
|
addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null);
|
||||||
|
}
|
||||||
|
if (ModelUtils.isMapSchema(schema)) {
|
||||||
|
// an object or anyType composed schema that has additionalProperties set
|
||||||
|
addAdditionPropertiesToCodeGenModel(m, schema);
|
||||||
|
} else {
|
||||||
|
m.setIsMap(false);
|
||||||
|
if (ModelUtils.isFreeFormObject(openAPI, schema)) {
|
||||||
|
// non-composed object type with no properties + additionalProperties
|
||||||
|
// additionalProperties must be null, ObjectSchema, or empty Schema
|
||||||
|
addAdditionPropertiesToCodeGenModel(m, schema);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,11 @@
|
|||||||
|
|
||||||
package org.openapitools.codegen.languages;
|
package org.openapitools.codegen.languages;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.media.ComposedSchema;
|
||||||
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.meta.features.*;
|
import org.openapitools.codegen.meta.features.*;
|
||||||
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -359,4 +362,28 @@ public class GoServerCodegen extends AbstractGoCodegen {
|
|||||||
public void setAddResponseHeaders(Boolean addResponseHeaders) {
|
public void setAddResponseHeaders(Boolean addResponseHeaders) {
|
||||||
this.addResponseHeaders = addResponseHeaders;
|
this.addResponseHeaders = addResponseHeaders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateModelForObject(CodegenModel m, Schema schema) {
|
||||||
|
/**
|
||||||
|
* we have a custom version of this function so we only set isMap to true if
|
||||||
|
* ModelUtils.isMapSchema
|
||||||
|
* In other generators, isMap is true for all type object schemas
|
||||||
|
*/
|
||||||
|
if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) {
|
||||||
|
// passing null to allProperties and allRequired as there's no parent
|
||||||
|
addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null);
|
||||||
|
}
|
||||||
|
if (ModelUtils.isMapSchema(schema)) {
|
||||||
|
// an object or anyType composed schema that has additionalProperties set
|
||||||
|
addAdditionPropertiesToCodeGenModel(m, schema);
|
||||||
|
} else {
|
||||||
|
m.setIsMap(false);
|
||||||
|
if (ModelUtils.isFreeFormObject(openAPI, schema)) {
|
||||||
|
// non-composed object type with no properties + additionalProperties
|
||||||
|
// additionalProperties must be null, ObjectSchema, or empty Schema
|
||||||
|
addAdditionPropertiesToCodeGenModel(m, schema);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,15 +17,20 @@
|
|||||||
|
|
||||||
package org.openapitools.codegen.languages;
|
package org.openapitools.codegen.languages;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.media.ComposedSchema;
|
||||||
|
import io.swagger.v3.oas.models.media.Schema;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openapitools.codegen.*;
|
import org.openapitools.codegen.*;
|
||||||
import org.openapitools.codegen.languages.features.CXFServerFeatures;
|
import org.openapitools.codegen.languages.features.CXFServerFeatures;
|
||||||
import org.openapitools.codegen.languages.features.GzipTestFeatures;
|
import org.openapitools.codegen.languages.features.GzipTestFeatures;
|
||||||
import org.openapitools.codegen.languages.features.LoggingTestFeatures;
|
import org.openapitools.codegen.languages.features.LoggingTestFeatures;
|
||||||
import org.openapitools.codegen.languages.features.UseGenericResponseFeatures;
|
import org.openapitools.codegen.languages.features.UseGenericResponseFeatures;
|
||||||
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||||
implements CXFServerFeatures, GzipTestFeatures, LoggingTestFeatures, UseGenericResponseFeatures {
|
implements CXFServerFeatures, GzipTestFeatures, LoggingTestFeatures, UseGenericResponseFeatures {
|
||||||
@ -124,7 +129,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void processOpts() {
|
public void processOpts() {
|
||||||
super.processOpts();
|
super.processOpts();
|
||||||
@ -328,4 +332,27 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
|||||||
this.useGenericResponse = useGenericResponse;
|
this.useGenericResponse = useGenericResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateModelForObject(CodegenModel m, Schema schema) {
|
||||||
|
/**
|
||||||
|
* we have a custom version of this function so we only set isMap to true if
|
||||||
|
* ModelUtils.isMapSchema
|
||||||
|
* In other generators, isMap is true for all type object schemas
|
||||||
|
*/
|
||||||
|
if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) {
|
||||||
|
// passing null to allProperties and allRequired as there's no parent
|
||||||
|
addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null);
|
||||||
|
}
|
||||||
|
if (ModelUtils.isMapSchema(schema)) {
|
||||||
|
// an object or anyType composed schema that has additionalProperties set
|
||||||
|
addAdditionPropertiesToCodeGenModel(m, schema);
|
||||||
|
} else {
|
||||||
|
m.setIsMap(false);
|
||||||
|
if (ModelUtils.isFreeFormObject(openAPI, schema)) {
|
||||||
|
// non-composed object type with no properties + additionalProperties
|
||||||
|
// additionalProperties must be null, ObjectSchema, or empty Schema
|
||||||
|
addAdditionPropertiesToCodeGenModel(m, schema);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -849,7 +849,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
|
|||||||
return prefix + modelName + fullSuffix;
|
return prefix + modelName + fullSuffix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isAnyTypeSchema(p)) {
|
if (ModelUtils.isAnyType(p)) {
|
||||||
// for v2 specs only, swagger-parser never generates an AnyType schemas even though it should generate them
|
// for v2 specs only, swagger-parser never generates an AnyType schemas even though it should generate them
|
||||||
// https://github.com/swagger-api/swagger-parser/issues/1378
|
// https://github.com/swagger-api/swagger-parser/issues/1378
|
||||||
// switch to v3 if you need AnyType to work
|
// switch to v3 if you need AnyType to work
|
||||||
@ -1115,7 +1115,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
|
|||||||
}
|
}
|
||||||
String refModelName = getModelName(schema);
|
String refModelName = getModelName(schema);
|
||||||
return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas);
|
return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas);
|
||||||
} else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) {
|
} else if (ModelUtils.isNullType(schema) || ModelUtils.isAnyType(schema)) {
|
||||||
// The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
|
// The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
|
||||||
// though this tooling supports it.
|
// though this tooling supports it.
|
||||||
return fullPrefix + "None" + closeChars;
|
return fullPrefix + "None" + closeChars;
|
||||||
|
@ -1681,4 +1681,93 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateRequestBodyForString(CodegenParameter codegenParameter, Schema schema, Set<String> imports, String bodyParameterName) {
|
||||||
|
/**
|
||||||
|
* we have a custom version of this function to set isString to false for isByteArray
|
||||||
|
*/
|
||||||
|
updateRequestBodyForPrimitiveType(codegenParameter, schema, bodyParameterName, imports);
|
||||||
|
if (ModelUtils.isByteArraySchema(schema)) {
|
||||||
|
codegenParameter.isByteArray = true;
|
||||||
|
// custom code
|
||||||
|
codegenParameter.setIsString(false);
|
||||||
|
} else if (ModelUtils.isBinarySchema(schema)) {
|
||||||
|
codegenParameter.isBinary = true;
|
||||||
|
codegenParameter.isFile = true; // file = binary in OAS3
|
||||||
|
} else if (ModelUtils.isUUIDSchema(schema)) {
|
||||||
|
codegenParameter.isUuid = true;
|
||||||
|
} else if (ModelUtils.isURISchema(schema)) {
|
||||||
|
codegenParameter.isUri = true;
|
||||||
|
} else if (ModelUtils.isEmailSchema(schema)) {
|
||||||
|
codegenParameter.isEmail = true;
|
||||||
|
} else if (ModelUtils.isDateSchema(schema)) { // date format
|
||||||
|
codegenParameter.setIsString(false); // for backward compatibility with 2.x
|
||||||
|
codegenParameter.isDate = true;
|
||||||
|
} else if (ModelUtils.isDateTimeSchema(schema)) { // date-time format
|
||||||
|
codegenParameter.setIsString(false); // for backward compatibility with 2.x
|
||||||
|
codegenParameter.isDateTime = true;
|
||||||
|
} else if (ModelUtils.isDecimalSchema(schema)) { // type: string, format: number
|
||||||
|
codegenParameter.isDecimal = true;
|
||||||
|
codegenParameter.setIsString(false);
|
||||||
|
}
|
||||||
|
codegenParameter.pattern = toRegularExpression(schema.getPattern());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateParameterForString(CodegenParameter codegenParameter, Schema parameterSchema){
|
||||||
|
/**
|
||||||
|
* we have a custom version of this function to set isString to false for uuid
|
||||||
|
*/
|
||||||
|
if (ModelUtils.isEmailSchema(parameterSchema)) {
|
||||||
|
codegenParameter.isEmail = true;
|
||||||
|
} else if (ModelUtils.isUUIDSchema(parameterSchema)) {
|
||||||
|
codegenParameter.setIsString(false);
|
||||||
|
codegenParameter.isUuid = true;
|
||||||
|
} else if (ModelUtils.isByteArraySchema(parameterSchema)) {
|
||||||
|
codegenParameter.setIsString(false);
|
||||||
|
codegenParameter.isByteArray = true;
|
||||||
|
codegenParameter.isPrimitiveType = true;
|
||||||
|
} else if (ModelUtils.isBinarySchema(parameterSchema)) {
|
||||||
|
codegenParameter.isBinary = true;
|
||||||
|
codegenParameter.isFile = true; // file = binary in OAS3
|
||||||
|
codegenParameter.isPrimitiveType = true;
|
||||||
|
} else if (ModelUtils.isDateSchema(parameterSchema)) {
|
||||||
|
codegenParameter.setIsString(false); // for backward compatibility with 2.x
|
||||||
|
codegenParameter.isDate = true;
|
||||||
|
codegenParameter.isPrimitiveType = true;
|
||||||
|
} else if (ModelUtils.isDateTimeSchema(parameterSchema)) {
|
||||||
|
codegenParameter.setIsString(false); // for backward compatibility with 2.x
|
||||||
|
codegenParameter.isDateTime = true;
|
||||||
|
codegenParameter.isPrimitiveType = true;
|
||||||
|
} else if (ModelUtils.isDecimalSchema(parameterSchema)) { // type: string, format: number
|
||||||
|
codegenParameter.setIsString(false);
|
||||||
|
codegenParameter.isDecimal = true;
|
||||||
|
codegenParameter.isPrimitiveType = true;
|
||||||
|
}
|
||||||
|
if (Boolean.TRUE.equals(codegenParameter.isString)) {
|
||||||
|
codegenParameter.isPrimitiveType = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updatePropertyForAnyType(CodegenProperty property, Schema p) {
|
||||||
|
/**
|
||||||
|
* we have a custom version of this function to not set isNullable to true
|
||||||
|
*/
|
||||||
|
// The 'null' value is allowed when the OAS schema is 'any type'.
|
||||||
|
// See https://github.com/OAI/OpenAPI-Specification/issues/1389
|
||||||
|
if (Boolean.FALSE.equals(p.getNullable())) {
|
||||||
|
LOGGER.warn("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", p.getName());
|
||||||
|
}
|
||||||
|
if (languageSpecificPrimitives.contains(property.dataType)) {
|
||||||
|
property.isPrimitiveType = true;
|
||||||
|
}
|
||||||
|
if (ModelUtils.isMapSchema(p)) {
|
||||||
|
// an object or anyType composed schema that has additionalProperties set
|
||||||
|
// some of our code assumes that any type schema with properties defined will be a map
|
||||||
|
// even though it should allow in any type and have map constraints for properties
|
||||||
|
updatePropertyForMap(property, p);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ 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.utils.ModelUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodegen {
|
public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodegen {
|
||||||
@ -255,4 +257,19 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
|
|||||||
supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json"));
|
supportingFiles.add(new SupportingFile("tsconfig.mustache", "", "tsconfig.json"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updatePropertyForAnyType(CodegenProperty property, Schema p) {
|
||||||
|
// The 'null' value is allowed when the OAS schema is 'any type'.
|
||||||
|
// See https://github.com/OAI/OpenAPI-Specification/issues/1389
|
||||||
|
// custom line here, do not set property.isNullable = true
|
||||||
|
if (languageSpecificPrimitives.contains(property.dataType)) {
|
||||||
|
property.isPrimitiveType = true;
|
||||||
|
}
|
||||||
|
if (ModelUtils.isMapSchema(p)) {
|
||||||
|
// an object or anyType composed schema that has additionalProperties set
|
||||||
|
// some of our code assumes that any type schema with properties defined will be a map
|
||||||
|
// even though it should allow in any type and have map constraints for properties
|
||||||
|
updatePropertyForMap(property, p);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1100,7 +1100,7 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
}
|
}
|
||||||
String refModelName = getModelName(schema);
|
String refModelName = getModelName(schema);
|
||||||
return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas);
|
return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, seenSchemas);
|
||||||
} else if (ModelUtils.isNullType(schema) || isAnyTypeSchema(schema)) {
|
} else if (ModelUtils.isNullType(schema) || ModelUtils.isAnyType(schema)) {
|
||||||
// The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
|
// The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
|
||||||
// though this tooling supports it.
|
// though this tooling supports it.
|
||||||
return fullPrefix + "null" + closeChars;
|
return fullPrefix + "null" + closeChars;
|
||||||
|
@ -407,6 +407,21 @@ public class ModelUtils {
|
|||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if the specified schema is type object
|
||||||
|
* We can't use isObjectSchema because it requires properties to exist which is not required
|
||||||
|
* We can't use isMap because it is true for AnyType use cases
|
||||||
|
*
|
||||||
|
* @param schema the OAS schema
|
||||||
|
* @return true if the specified schema is an Object schema.
|
||||||
|
*/
|
||||||
|
public static boolean isTypeObjectSchema(Schema schema) {
|
||||||
|
if (SchemaTypeUtil.OBJECT_TYPE.equals(schema.getType())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the specified schema is an object with a fixed number of properties.
|
* Return true if the specified schema is an object with a fixed number of properties.
|
||||||
*
|
*
|
||||||
@ -1487,18 +1502,23 @@ public class ModelUtils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For when a type is not defined on a schema
|
||||||
|
* Note: properties, additionalProperties, enums, validations, items, and composed schemas (oneOf/anyOf/allOf)
|
||||||
|
* can be defined or omitted on these any type schemas
|
||||||
|
* @param schema the schema that we are checking
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public static boolean isAnyType(Schema schema) {
|
||||||
|
return (schema.get$ref() == null && schema.getType() == null);
|
||||||
|
}
|
||||||
|
|
||||||
public static void syncValidationProperties(Schema schema, IJsonSchemaValidationProperties target) {
|
public static void syncValidationProperties(Schema schema, IJsonSchemaValidationProperties target) {
|
||||||
|
// TODO move this method to IJsonSchemaValidationProperties
|
||||||
if (schema != null && target != null) {
|
if (schema != null && target != null) {
|
||||||
if (isNullType(schema) || schema.get$ref() != null || isBooleanSchema(schema)) {
|
if (isNullType(schema) || schema.get$ref() != null || isBooleanSchema(schema)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean isAnyType = (schema.getClass().equals(Schema.class) && schema.get$ref() == null && schema.getType() == null &&
|
|
||||||
(schema.getProperties() == null || schema.getProperties().isEmpty()) &&
|
|
||||||
schema.getAdditionalProperties() == null && schema.getNot() == null &&
|
|
||||||
schema.getEnum() == null);
|
|
||||||
if (isAnyType) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Integer minItems = schema.getMinItems();
|
Integer minItems = schema.getMinItems();
|
||||||
Integer maxItems = schema.getMaxItems();
|
Integer maxItems = schema.getMaxItems();
|
||||||
Boolean uniqueItems = schema.getUniqueItems();
|
Boolean uniqueItems = schema.getUniqueItems();
|
||||||
@ -1515,7 +1535,7 @@ public class ModelUtils {
|
|||||||
|
|
||||||
if (isArraySchema(schema)) {
|
if (isArraySchema(schema)) {
|
||||||
setArrayValidations(minItems, maxItems, uniqueItems, target);
|
setArrayValidations(minItems, maxItems, uniqueItems, target);
|
||||||
} else if (isMapSchema(schema) || isObjectSchema(schema)) {
|
} else if (isTypeObjectSchema(schema)) {
|
||||||
setObjectValidations(minProperties, maxProperties, target);
|
setObjectValidations(minProperties, maxProperties, target);
|
||||||
} else if (isStringSchema(schema)) {
|
} else if (isStringSchema(schema)) {
|
||||||
setStringValidations(minLength, maxLength, pattern, target);
|
setStringValidations(minLength, maxLength, pattern, target);
|
||||||
@ -1524,8 +1544,8 @@ public class ModelUtils {
|
|||||||
}
|
}
|
||||||
} else if (isNumberSchema(schema) || isIntegerSchema(schema)) {
|
} else if (isNumberSchema(schema) || isIntegerSchema(schema)) {
|
||||||
setNumericValidations(schema, multipleOf, minimum, maximum, exclusiveMinimum, exclusiveMaximum, target);
|
setNumericValidations(schema, multipleOf, minimum, maximum, exclusiveMinimum, exclusiveMaximum, target);
|
||||||
} else if (isComposedSchema(schema)) {
|
} else if (isAnyType(schema)) {
|
||||||
// this could be composed out of anything so set all validations here
|
// anyType can have any validations set on it
|
||||||
setArrayValidations(minItems, maxItems, uniqueItems, target);
|
setArrayValidations(minItems, maxItems, uniqueItems, target);
|
||||||
setObjectValidations(minProperties, maxProperties, target);
|
setObjectValidations(minProperties, maxProperties, target);
|
||||||
setStringValidations(minLength, maxLength, pattern, target);
|
setStringValidations(minLength, maxLength, pattern, target);
|
||||||
|
@ -3636,4 +3636,214 @@ public class DefaultCodegenTest {
|
|||||||
co = codegen.fromOperation(path, "GET", operation, null);
|
co = codegen.fromOperation(path, "GET", operation, null);
|
||||||
assertEquals(co.operationId, "getAll");
|
assertEquals(co.operationId, "getAll");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testComposedPropertyTypes() {
|
||||||
|
DefaultCodegen codegen = new DefaultCodegen();
|
||||||
|
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml");
|
||||||
|
codegen.setOpenAPI(openAPI);
|
||||||
|
String modelName;
|
||||||
|
|
||||||
|
modelName = "ObjectWithComposedProperties";
|
||||||
|
CodegenModel m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.vars.get(0).getIsMap());
|
||||||
|
assertTrue(m.vars.get(1).getIsNumber());
|
||||||
|
assertTrue(m.vars.get(2).getIsUnboundedInteger());
|
||||||
|
assertTrue(m.vars.get(3).getIsString());
|
||||||
|
assertTrue(m.vars.get(4).getIsBoolean());
|
||||||
|
assertTrue(m.vars.get(5).getIsArray());
|
||||||
|
assertTrue(m.vars.get(6).getIsNull());
|
||||||
|
assertTrue(m.vars.get(7).getIsAnyType());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testComposedModelTypes() {
|
||||||
|
DefaultCodegen codegen = new DefaultCodegen();
|
||||||
|
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml");
|
||||||
|
codegen.setOpenAPI(openAPI);
|
||||||
|
String modelName;
|
||||||
|
CodegenModel m;
|
||||||
|
|
||||||
|
modelName = "ComposedObject";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsMap());
|
||||||
|
|
||||||
|
modelName = "ComposedNumber";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsNumber());
|
||||||
|
|
||||||
|
modelName = "ComposedInteger";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsUnboundedInteger());
|
||||||
|
|
||||||
|
modelName = "ComposedString";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsString());
|
||||||
|
|
||||||
|
modelName = "ComposedBool";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsBoolean());
|
||||||
|
|
||||||
|
modelName = "ComposedArray";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsArray());
|
||||||
|
|
||||||
|
modelName = "ComposedNone";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsNull());
|
||||||
|
|
||||||
|
modelName = "ComposedAnyType";
|
||||||
|
m = codegen.fromModel(modelName, openAPI.getComponents().getSchemas().get(modelName));
|
||||||
|
assertTrue(m.getIsAnyType());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testComposedResponseTypes() {
|
||||||
|
DefaultCodegen codegen = new DefaultCodegen();
|
||||||
|
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml");
|
||||||
|
codegen.setOpenAPI(openAPI);
|
||||||
|
String path;
|
||||||
|
CodegenOperation co;
|
||||||
|
CodegenResponse cr;
|
||||||
|
|
||||||
|
path = "/ComposedObject";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsMap());
|
||||||
|
|
||||||
|
path = "/ComposedNumber";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsNumber());
|
||||||
|
|
||||||
|
path = "/ComposedInteger";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsUnboundedInteger());
|
||||||
|
|
||||||
|
path = "/ComposedString";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsString());
|
||||||
|
|
||||||
|
path = "/ComposedBool";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsBoolean());
|
||||||
|
|
||||||
|
path = "/ComposedArray";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsArray());
|
||||||
|
|
||||||
|
path = "/ComposedNone";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsNull());
|
||||||
|
|
||||||
|
path = "/ComposedAnyType";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cr = co.responses.get(0);
|
||||||
|
assertTrue(cr.getIsAnyType());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testComposedRequestBodyTypes() {
|
||||||
|
DefaultCodegen codegen = new DefaultCodegen();
|
||||||
|
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml");
|
||||||
|
codegen.setOpenAPI(openAPI);
|
||||||
|
String path;
|
||||||
|
CodegenOperation co;
|
||||||
|
CodegenParameter cp;
|
||||||
|
|
||||||
|
path = "/ComposedObject";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsMap());
|
||||||
|
|
||||||
|
path = "/ComposedNumber";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsNumber());
|
||||||
|
|
||||||
|
path = "/ComposedInteger";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsUnboundedInteger());
|
||||||
|
|
||||||
|
path = "/ComposedString";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsString());
|
||||||
|
|
||||||
|
path = "/ComposedBool";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsBoolean());
|
||||||
|
|
||||||
|
path = "/ComposedArray";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsArray());
|
||||||
|
|
||||||
|
path = "/ComposedNone";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsNull());
|
||||||
|
|
||||||
|
path = "/ComposedAnyType";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.bodyParam;
|
||||||
|
assertTrue(cp.getIsAnyType());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testComposedRequestQueryParamTypes() {
|
||||||
|
DefaultCodegen codegen = new DefaultCodegen();
|
||||||
|
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_10330.yaml");
|
||||||
|
codegen.setOpenAPI(openAPI);
|
||||||
|
String path;
|
||||||
|
CodegenOperation co;
|
||||||
|
CodegenParameter cp;
|
||||||
|
|
||||||
|
path = "/ComposedObject";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsMap());
|
||||||
|
|
||||||
|
path = "/ComposedNumber";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsNumber());
|
||||||
|
|
||||||
|
path = "/ComposedInteger";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsUnboundedInteger());
|
||||||
|
|
||||||
|
path = "/ComposedString";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsString());
|
||||||
|
|
||||||
|
path = "/ComposedBool";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsBoolean());
|
||||||
|
|
||||||
|
path = "/ComposedArray";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsArray());
|
||||||
|
|
||||||
|
path = "/ComposedNone";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsNull());
|
||||||
|
|
||||||
|
path = "/ComposedAnyType";
|
||||||
|
co = codegen.fromOperation(path, "GET", openAPI.getPaths().get(path).getGet(), null);
|
||||||
|
cp = co.queryParams.get(0);
|
||||||
|
assertTrue(cp.getIsAnyType());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -820,6 +820,7 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertTrue(cp3.isAnyType);
|
Assert.assertTrue(cp3.isAnyType);
|
||||||
|
|
||||||
// map
|
// map
|
||||||
|
// Should allow in any type including map, https://github.com/swagger-api/swagger-parser/issues/1603
|
||||||
final CodegenProperty cp4 = cm2.vars.get(3);
|
final CodegenProperty cp4 = cm2.vars.get(3);
|
||||||
Assert.assertEquals(cp4.baseName, "map_any_value");
|
Assert.assertEquals(cp4.baseName, "map_any_value");
|
||||||
Assert.assertEquals(cp4.dataType, "Map<String, Object>");
|
Assert.assertEquals(cp4.dataType, "Map<String, Object>");
|
||||||
@ -830,6 +831,7 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertTrue(cp4.isFreeFormObject);
|
Assert.assertTrue(cp4.isFreeFormObject);
|
||||||
Assert.assertFalse(cp4.isAnyType);
|
Assert.assertFalse(cp4.isAnyType);
|
||||||
|
|
||||||
|
// Should allow in any type including map, https://github.com/swagger-api/swagger-parser/issues/1603
|
||||||
final CodegenProperty cp5 = cm2.vars.get(4);
|
final CodegenProperty cp5 = cm2.vars.get(4);
|
||||||
Assert.assertEquals(cp5.baseName, "map_any_value_with_desc");
|
Assert.assertEquals(cp5.baseName, "map_any_value_with_desc");
|
||||||
Assert.assertEquals(cp5.dataType, "Map<String, Object>");
|
Assert.assertEquals(cp5.dataType, "Map<String, Object>");
|
||||||
@ -840,6 +842,7 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertTrue(cp5.isFreeFormObject);
|
Assert.assertTrue(cp5.isFreeFormObject);
|
||||||
Assert.assertFalse(cp5.isAnyType);
|
Assert.assertFalse(cp5.isAnyType);
|
||||||
|
|
||||||
|
// Should allow in any type including map, https://github.com/swagger-api/swagger-parser/issues/1603
|
||||||
final CodegenProperty cp6 = cm2.vars.get(5);
|
final CodegenProperty cp6 = cm2.vars.get(5);
|
||||||
Assert.assertEquals(cp6.baseName, "map_any_value_nullable");
|
Assert.assertEquals(cp6.baseName, "map_any_value_nullable");
|
||||||
Assert.assertEquals(cp6.dataType, "Map<String, Object>");
|
Assert.assertEquals(cp6.dataType, "Map<String, Object>");
|
||||||
@ -851,6 +854,7 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertFalse(cp6.isAnyType);
|
Assert.assertFalse(cp6.isAnyType);
|
||||||
|
|
||||||
// array
|
// array
|
||||||
|
// Should allow in any type including array, https://github.com/swagger-api/swagger-parser/issues/1603
|
||||||
final CodegenProperty cp7 = cm2.vars.get(6);
|
final CodegenProperty cp7 = cm2.vars.get(6);
|
||||||
Assert.assertEquals(cp7.baseName, "array_any_value");
|
Assert.assertEquals(cp7.baseName, "array_any_value");
|
||||||
Assert.assertEquals(cp7.dataType, "List<Object>");
|
Assert.assertEquals(cp7.dataType, "List<Object>");
|
||||||
@ -861,6 +865,7 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertFalse(cp7.isFreeFormObject);
|
Assert.assertFalse(cp7.isFreeFormObject);
|
||||||
Assert.assertFalse(cp7.isAnyType);
|
Assert.assertFalse(cp7.isAnyType);
|
||||||
|
|
||||||
|
// Should allow in any type including array, https://github.com/swagger-api/swagger-parser/issues/1603
|
||||||
final CodegenProperty cp8 = cm2.vars.get(7);
|
final CodegenProperty cp8 = cm2.vars.get(7);
|
||||||
Assert.assertEquals(cp8.baseName, "array_any_value_with_desc");
|
Assert.assertEquals(cp8.baseName, "array_any_value_with_desc");
|
||||||
Assert.assertEquals(cp8.dataType, "List<Object>");
|
Assert.assertEquals(cp8.dataType, "List<Object>");
|
||||||
@ -871,6 +876,7 @@ public class JavaClientCodegenTest {
|
|||||||
Assert.assertFalse(cp8.isFreeFormObject);
|
Assert.assertFalse(cp8.isFreeFormObject);
|
||||||
Assert.assertFalse(cp8.isAnyType);
|
Assert.assertFalse(cp8.isAnyType);
|
||||||
|
|
||||||
|
// Should allow in any type including array, https://github.com/swagger-api/swagger-parser/issues/1603
|
||||||
final CodegenProperty cp9 = cm2.vars.get(8);
|
final CodegenProperty cp9 = cm2.vars.get(8);
|
||||||
Assert.assertEquals(cp9.baseName, "array_any_value_nullable");
|
Assert.assertEquals(cp9.baseName, "array_any_value_nullable");
|
||||||
Assert.assertEquals(cp9.dataType, "List<Object>");
|
Assert.assertEquals(cp9.dataType, "List<Object>");
|
||||||
|
@ -360,7 +360,7 @@ public class PythonClientTest {
|
|||||||
final PythonClientCodegen codegen = new PythonClientCodegen();
|
final PythonClientCodegen codegen = new PythonClientCodegen();
|
||||||
|
|
||||||
OpenAPI openAPI = TestUtils.createOpenAPI();
|
OpenAPI openAPI = TestUtils.createOpenAPI();
|
||||||
final Schema noDefault = new ArraySchema()
|
final Schema noDefault = new Schema()
|
||||||
.type("number")
|
.type("number")
|
||||||
.minimum(new BigDecimal("10"));
|
.minimum(new BigDecimal("10"));
|
||||||
final Schema hasDefault = new Schema()
|
final Schema hasDefault = new Schema()
|
||||||
|
@ -0,0 +1,289 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
title: OpenAPI Petstore
|
||||||
|
description: "composed schema isX type checks"
|
||||||
|
license:
|
||||||
|
name: Apache-2.0
|
||||||
|
url: https://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
version: 1.0.0
|
||||||
|
servers:
|
||||||
|
- url: http://petstore.swagger.io:80/v2
|
||||||
|
tags: []
|
||||||
|
paths:
|
||||||
|
/ComposedObject:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedObject
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedObject
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
/ComposedNumber:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedNumber
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedNumber
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
/ComposedInteger:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedInteger
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedInteger
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
/ComposedString:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedString
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedString
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
/ComposedBool:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedBool
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedBool
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
/ComposedArray:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedArray
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items: {}
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items: {}
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedArray
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items: {}
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
/ComposedNone:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedNone
|
||||||
|
schema:
|
||||||
|
type: 'null'
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: 'null'
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedNone
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: 'null'
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
/ComposedAnyType:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: ComposedAnyType
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ComposedAnyType
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
ObjectWithComposedProperties:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
ComposedObject:
|
||||||
|
type: object
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedNumber:
|
||||||
|
type: number
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedInteger:
|
||||||
|
type: integer
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedString:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedBool:
|
||||||
|
type: boolean
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedArray:
|
||||||
|
type: array
|
||||||
|
items: {}
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedNone:
|
||||||
|
type: 'null'
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedAnyType:
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedObject:
|
||||||
|
type: object
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedNumber:
|
||||||
|
type: number
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedInteger:
|
||||||
|
type: integer
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedString:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedBool:
|
||||||
|
type: boolean
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedArray:
|
||||||
|
type: array
|
||||||
|
items: {}
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedNone:
|
||||||
|
type: 'null'
|
||||||
|
allOf:
|
||||||
|
- {}
|
||||||
|
ComposedAnyType:
|
||||||
|
allOf:
|
||||||
|
- {}
|
@ -31,14 +31,16 @@ components:
|
|||||||
GeoJsonGeometry:
|
GeoJsonGeometry:
|
||||||
title: GeoJsonGeometry
|
title: GeoJsonGeometry
|
||||||
description: GeoJSON geometry
|
description: GeoJSON geometry
|
||||||
oneOf:
|
type: object
|
||||||
- $ref: '#/components/schemas/Point'
|
properties:
|
||||||
- $ref: '#/components/schemas/GeometryCollection'
|
type:
|
||||||
discriminator:
|
type: string
|
||||||
propertyName: type
|
enum:
|
||||||
mapping:
|
- GeometryCollection
|
||||||
Point: '#/components/schemas/Point'
|
geometries:
|
||||||
GeometryCollection: '#/components/schemas/GeometryCollection'
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/GeoJsonGeometry'
|
||||||
externalDocs:
|
externalDocs:
|
||||||
url: http://geojson.org/geojson-spec.html#geometry-objects
|
url: http://geojson.org/geojson-spec.html#geometry-objects
|
||||||
Point:
|
Point:
|
||||||
|
@ -766,9 +766,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
var apiInstance = new FakeApi(config);
|
var apiInstance = new FakeApi(config);
|
||||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
|
||||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||||
@ -795,9 +795,9 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
|
||||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
|
||||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||||
|
@ -187,7 +187,7 @@ namespace Example
|
|||||||
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
var apiInstance = new PetApi(config);
|
var apiInstance = new PetApi(config);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -810,9 +810,9 @@ namespace Example
|
|||||||
HttpClient httpClient = new HttpClient();
|
HttpClient httpClient = new HttpClient();
|
||||||
HttpClientHandler httpClientHandler = new HttpClientHandler();
|
HttpClientHandler httpClientHandler = new HttpClientHandler();
|
||||||
var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
|
var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
|
||||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
|
||||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||||
@ -839,9 +839,9 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
|
||||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
|
||||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||||
|
@ -199,7 +199,7 @@ namespace Example
|
|||||||
HttpClient httpClient = new HttpClient();
|
HttpClient httpClient = new HttpClient();
|
||||||
HttpClientHandler httpClientHandler = new HttpClientHandler();
|
HttpClientHandler httpClientHandler = new HttpClientHandler();
|
||||||
var apiInstance = new PetApi(httpClient, config, httpClientHandler);
|
var apiInstance = new PetApi(httpClient, config, httpClientHandler);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -222,7 +222,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -766,9 +766,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
var apiInstance = new FakeApi(config);
|
var apiInstance = new FakeApi(config);
|
||||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
|
||||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||||
@ -795,9 +795,9 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
|
||||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
|
||||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||||
|
@ -187,7 +187,7 @@ namespace Example
|
|||||||
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
var apiInstance = new PetApi(config);
|
var apiInstance = new PetApi(config);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -766,9 +766,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
var apiInstance = new FakeApi(config);
|
var apiInstance = new FakeApi(config);
|
||||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
|
||||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||||
@ -795,9 +795,9 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
|
||||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
|
||||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||||
|
@ -187,7 +187,7 @@ namespace Example
|
|||||||
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
var apiInstance = new PetApi(config);
|
var apiInstance = new PetApi(config);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -766,9 +766,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
var apiInstance = new FakeApi(config);
|
var apiInstance = new FakeApi(config);
|
||||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
|
||||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||||
@ -795,9 +795,9 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
|
||||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
|
||||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||||
|
@ -187,7 +187,7 @@ namespace Example
|
|||||||
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
var apiInstance = new PetApi(config);
|
var apiInstance = new PetApi(config);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -766,9 +766,9 @@ namespace Example
|
|||||||
Configuration config = new Configuration();
|
Configuration config = new Configuration();
|
||||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
var apiInstance = new FakeApi(config);
|
var apiInstance = new FakeApi(config);
|
||||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
|
||||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||||
@ -795,9 +795,9 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
|
||||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
|
||||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||||
|
@ -187,7 +187,7 @@ namespace Example
|
|||||||
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
var apiInstance = new PetApi(config);
|
var apiInstance = new PetApi(config);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ namespace Example
|
|||||||
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
config.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
var apiInstance = new PetApi(config);
|
var apiInstance = new PetApi(config);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -211,7 +211,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -976,9 +976,9 @@ namespace Example
|
|||||||
{
|
{
|
||||||
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2";
|
||||||
var apiInstance = new FakeApi(Configuration.Default);
|
var apiInstance = new FakeApi(Configuration.Default);
|
||||||
var enumHeaderStringArray = enumHeaderStringArray_example; // List<string> | Header parameter enum test (string array) (optional)
|
var enumHeaderStringArray = new List<string>(); // List<string> | Header parameter enum test (string array) (optional)
|
||||||
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryStringArray = enumQueryStringArray_example; // List<string> | Query parameter enum test (string array) (optional)
|
var enumQueryStringArray = new List<string>(); // List<string> | Query parameter enum test (string array) (optional)
|
||||||
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
|
||||||
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional)
|
||||||
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional)
|
||||||
@ -1006,9 +1006,9 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional]
|
||||||
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional]
|
||||||
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional]
|
||||||
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
|
||||||
|
@ -200,7 +200,7 @@ namespace Example
|
|||||||
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
|
||||||
|
|
||||||
var apiInstance = new PetApi(Configuration.Default);
|
var apiInstance = new PetApi(Configuration.Default);
|
||||||
var status = status_example; // List<string> | Status values that need to be considered for filter
|
var status = new List<string>(); // List<string> | Status values that need to be considered for filter
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -224,7 +224,7 @@ namespace Example
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | **List<string>**| Status values that need to be considered for filter |
|
**status** | [**List<string>**](string.md)| Status values that need to be considered for filter |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -673,7 +673,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -673,7 +673,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -1411,7 +1411,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
CompletableFuture<Void> result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
CompletableFuture<Void> result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
@ -1492,7 +1492,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
CompletableFuture<ApiResponse<Void>> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -1329,7 +1329,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
@ -1409,7 +1409,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
ApiResponse<Void> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
ApiResponse<Void> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -636,7 +636,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -636,7 +636,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -636,7 +636,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -674,7 +674,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -872,7 +872,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -625,7 +625,7 @@ let opts = {
|
|||||||
'enumQueryString': "'-efg'", // String | Query parameter enum test (string)
|
'enumQueryString': "'-efg'", // String | Query parameter enum test (string)
|
||||||
'enumQueryInteger': 56, // Number | Query parameter enum test (double)
|
'enumQueryInteger': 56, // Number | Query parameter enum test (double)
|
||||||
'enumQueryDouble': 3.4, // Number | Query parameter enum test (double)
|
'enumQueryDouble': 3.4, // Number | Query parameter enum test (double)
|
||||||
'enumFormStringArray': "'$'", // [String] | Form parameter enum test (string array)
|
'enumFormStringArray': ["'$'"], // [String] | Form parameter enum test (string array)
|
||||||
'enumFormString': "'-efg'" // String | Form parameter enum test (string)
|
'enumFormString': "'-efg'" // String | Form parameter enum test (string)
|
||||||
};
|
};
|
||||||
apiInstance.testEnumParameters(opts, (error, data, response) => {
|
apiInstance.testEnumParameters(opts, (error, data, response) => {
|
||||||
|
@ -613,7 +613,7 @@ let opts = {
|
|||||||
'enumQueryString': "'-efg'", // String | Query parameter enum test (string)
|
'enumQueryString': "'-efg'", // String | Query parameter enum test (string)
|
||||||
'enumQueryInteger': 56, // Number | Query parameter enum test (double)
|
'enumQueryInteger': 56, // Number | Query parameter enum test (double)
|
||||||
'enumQueryDouble': 3.4, // Number | Query parameter enum test (double)
|
'enumQueryDouble': 3.4, // Number | Query parameter enum test (double)
|
||||||
'enumFormStringArray': "'$'", // [String] | Form parameter enum test (string array)
|
'enumFormStringArray': ["'$'"], // [String] | Form parameter enum test (string array)
|
||||||
'enumFormString': "'-efg'" // String | Form parameter enum test (string)
|
'enumFormString': "'-efg'" // String | Form parameter enum test (string)
|
||||||
};
|
};
|
||||||
apiInstance.testEnumParameters(opts).then(() => {
|
apiInstance.testEnumParameters(opts).then(() => {
|
||||||
|
@ -750,7 +750,7 @@ $enum_query_string_array = array('enum_query_string_array_example'); // string[]
|
|||||||
$enum_query_string = '-efg'; // string | Query parameter enum test (string)
|
$enum_query_string = '-efg'; // string | Query parameter enum test (string)
|
||||||
$enum_query_integer = 56; // int | Query parameter enum test (double)
|
$enum_query_integer = 56; // int | Query parameter enum test (double)
|
||||||
$enum_query_double = 3.4; // double | Query parameter enum test (double)
|
$enum_query_double = 3.4; // double | Query parameter enum test (double)
|
||||||
$enum_form_string_array = '$'; // string[] | Form parameter enum test (string array)
|
$enum_form_string_array = array('$'); // string[] | Form parameter enum test (string array)
|
||||||
$enum_form_string = '-efg'; // string | Form parameter enum test (string)
|
$enum_form_string = '-efg'; // string | Form parameter enum test (string)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -973,7 +973,9 @@ with petstore_api.ApiClient() as api_client:
|
|||||||
enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
||||||
enum_query_integer = 1 # int | Query parameter enum test (double) (optional)
|
enum_query_integer = 1 # int | Query parameter enum test (double) (optional)
|
||||||
enum_query_double = 1.1 # float | Query parameter enum test (double) (optional)
|
enum_query_double = 1.1 # float | Query parameter enum test (double) (optional)
|
||||||
enum_form_string_array = "$" # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$"
|
enum_form_string_array = [
|
||||||
|
"$",
|
||||||
|
] # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$"
|
||||||
enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
|
@ -657,7 +657,9 @@ with petstore_api.ApiClient(configuration) as api_client:
|
|||||||
pet_id = 1 # int | ID of pet to update
|
pet_id = 1 # int | ID of pet to update
|
||||||
additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional)
|
additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional)
|
||||||
file = open('/path/to/file', 'rb') # file_type | file to upload (optional)
|
file = open('/path/to/file', 'rb') # file_type | file to upload (optional)
|
||||||
files = # [file_type] | files to upload (optional)
|
files = [
|
||||||
|
null,
|
||||||
|
] # [file_type] | files to upload (optional)
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
try:
|
try:
|
||||||
|
@ -973,7 +973,9 @@ with petstore_api.ApiClient() as api_client:
|
|||||||
enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
||||||
enum_query_integer = 1 # int | Query parameter enum test (double) (optional)
|
enum_query_integer = 1 # int | Query parameter enum test (double) (optional)
|
||||||
enum_query_double = 1.1 # float | Query parameter enum test (double) (optional)
|
enum_query_double = 1.1 # float | Query parameter enum test (double) (optional)
|
||||||
enum_form_string_array = "$" # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$"
|
enum_form_string_array = [
|
||||||
|
"$",
|
||||||
|
] # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$"
|
||||||
enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
|
@ -657,7 +657,9 @@ with petstore_api.ApiClient(configuration) as api_client:
|
|||||||
pet_id = 1 # int | ID of pet to update
|
pet_id = 1 # int | ID of pet to update
|
||||||
additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional)
|
additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional)
|
||||||
file = open('/path/to/file', 'rb') # file_type | file to upload (optional)
|
file = open('/path/to/file', 'rb') # file_type | file to upload (optional)
|
||||||
files = # [file_type] | files to upload (optional)
|
files = [
|
||||||
|
null,
|
||||||
|
] # [file_type] | files to upload (optional)
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
try:
|
try:
|
||||||
|
@ -1300,7 +1300,7 @@ export interface User {
|
|||||||
* @type {any}
|
* @type {any}
|
||||||
* @memberof User
|
* @memberof User
|
||||||
*/
|
*/
|
||||||
arbitraryTypeValue?: any | null;
|
arbitraryTypeValue?: any;
|
||||||
/**
|
/**
|
||||||
* test code generation for any type Value can be any type - string, number, boolean, array, object or the \'null\' value.
|
* test code generation for any type Value can be any type - string, number, boolean, array, object or the \'null\' value.
|
||||||
* @type {any}
|
* @type {any}
|
||||||
|
@ -186,7 +186,7 @@ uuidGet value_query =
|
|||||||
"GET"
|
"GET"
|
||||||
"/uuid"
|
"/uuid"
|
||||||
[]
|
[]
|
||||||
[ ( "value", Maybe.map Uuid.toString value_query ) ]
|
[ ( "value", Maybe.map identityUuid.toString value_query ) ]
|
||||||
[]
|
[]
|
||||||
Nothing
|
Nothing
|
||||||
Uuid.decoder
|
Uuid.decoder
|
||||||
|
@ -585,7 +585,7 @@ final BuiltList<String> enumQueryStringArray = ; // BuiltList<String> | Query pa
|
|||||||
final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
||||||
final int enumQueryInteger = 56; // int | Query parameter enum test (double)
|
final int enumQueryInteger = 56; // int | Query parameter enum test (double)
|
||||||
final double enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
final double enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
||||||
final BuiltList<String> enumFormStringArray = enumFormStringArray_example; // BuiltList<String> | Form parameter enum test (string array)
|
final BuiltList<String> enumFormStringArray = ; // BuiltList<String> | Form parameter enum test (string array)
|
||||||
final String enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
final String enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -585,7 +585,7 @@ var enumQueryStringArray = []; // BuiltList<String> | Query parameter enum test
|
|||||||
var enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
var enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
||||||
var enumQueryInteger = 56; // int | Query parameter enum test (double)
|
var enumQueryInteger = 56; // int | Query parameter enum test (double)
|
||||||
var enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
var enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
||||||
var enumFormStringArray = [enumFormStringArray_example]; // BuiltList<String> | Form parameter enum test (string array)
|
var enumFormStringArray = []; // BuiltList<String> | Form parameter enum test (string array)
|
||||||
var enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
var enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -582,7 +582,7 @@ final enumQueryStringArray = []; // List<String> | Query parameter enum test (st
|
|||||||
final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
||||||
final enumQueryInteger = 56; // int | Query parameter enum test (double)
|
final enumQueryInteger = 56; // int | Query parameter enum test (double)
|
||||||
final enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
final enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
||||||
final enumFormStringArray = [enumFormStringArray_example]; // List<String> | Form parameter enum test (string array)
|
final enumFormStringArray = []; // List<String> | Form parameter enum test (string array)
|
||||||
final enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
final enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -582,7 +582,7 @@ final enumQueryStringArray = []; // List<String> | Query parameter enum test (st
|
|||||||
final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
|
||||||
final enumQueryInteger = 56; // int | Query parameter enum test (double)
|
final enumQueryInteger = 56; // int | Query parameter enum test (double)
|
||||||
final enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
final enumQueryDouble = 1.2; // double | Query parameter enum test (double)
|
||||||
final enumFormStringArray = [enumFormStringArray_example]; // List<String> | Form parameter enum test (string array)
|
final enumFormStringArray = []; // List<String> | Form parameter enum test (string array)
|
||||||
final enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
final enumFormString = enumFormString_example; // String | Form parameter enum test (string)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -729,7 +729,7 @@ public class Example {
|
|||||||
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
String enumQueryString = "_abc"; // String | Query parameter enum test (string)
|
||||||
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double)
|
||||||
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double)
|
||||||
List<String> enumFormStringArray = ">"; // List<String> | Form parameter enum test (string array)
|
List<String> enumFormStringArray = Arrays.asList("$"); // List<String> | Form parameter enum test (string array)
|
||||||
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
String enumFormString = "_abc"; // String | Form parameter enum test (string)
|
||||||
try {
|
try {
|
||||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
|
@ -333,7 +333,7 @@ configuration = petstore_api.Configuration(
|
|||||||
with petstore_api.ApiClient() as api_client:
|
with petstore_api.ApiClient() as api_client:
|
||||||
# Create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
composed_one_of_number_with_validations = ComposedOneOfNumberWithValidations() # ComposedOneOfNumberWithValidations | Input model (optional)
|
composed_one_of_number_with_validations = ComposedOneOfNumberWithValidations(None) # ComposedOneOfNumberWithValidations | Input model (optional)
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
# and optional values
|
# and optional values
|
||||||
@ -609,11 +609,7 @@ configuration = petstore_api.Configuration(
|
|||||||
with petstore_api.ApiClient() as api_client:
|
with petstore_api.ApiClient() as api_client:
|
||||||
# Create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
mammal = Mammal(
|
mammal = Mammal(None) # Mammal | Input mammal
|
||||||
has_baleen=True,
|
|
||||||
has_teeth=True,
|
|
||||||
class_name="whale",
|
|
||||||
) # Mammal | Input mammal
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
try:
|
try:
|
||||||
@ -1437,7 +1433,9 @@ with petstore_api.ApiClient() as api_client:
|
|||||||
enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
||||||
enum_query_integer = 1 # int | Query parameter enum test (double) (optional)
|
enum_query_integer = 1 # int | Query parameter enum test (double) (optional)
|
||||||
enum_query_double = 1.1 # float | Query parameter enum test (double) (optional)
|
enum_query_double = 1.1 # float | Query parameter enum test (double) (optional)
|
||||||
enum_form_string_array = "$" # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$"
|
enum_form_string_array = [
|
||||||
|
"$",
|
||||||
|
] # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$"
|
||||||
enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
@ -1956,7 +1954,9 @@ configuration = petstore_api.Configuration(
|
|||||||
with petstore_api.ApiClient() as api_client:
|
with petstore_api.ApiClient() as api_client:
|
||||||
# Create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = fake_api.FakeApi(api_client)
|
api_instance = fake_api.FakeApi(api_client)
|
||||||
files = open('/path/to/file', 'rb') # [file_type] | (optional)
|
files = [
|
||||||
|
open('/path/to/file', 'rb'),
|
||||||
|
] # [file_type] | (optional)
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
# example passing only required values which don't have defaults set
|
||||||
# and optional values
|
# and optional values
|
||||||
|
@ -26,7 +26,7 @@ const apiInstance = new .DefaultApi(configuration);
|
|||||||
let body:.DefaultApiFilePostRequest = {
|
let body:.DefaultApiFilePostRequest = {
|
||||||
// InlineObject (optional)
|
// InlineObject (optional)
|
||||||
inlineObject: {
|
inlineObject: {
|
||||||
file: ,
|
file: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ const apiInstance = new .DefaultApi(configuration);
|
|||||||
|
|
||||||
let body:.DefaultApiPetsFilteredPatchRequest = {
|
let body:.DefaultApiPetsFilteredPatchRequest = {
|
||||||
// PetByAge | PetByType (optional)
|
// PetByAge | PetByType (optional)
|
||||||
petByAgePetByType: ,
|
petByAgePetByType: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
apiInstance.petsFilteredPatch(body).then((data:any) => {
|
apiInstance.petsFilteredPatch(body).then((data:any) => {
|
||||||
@ -133,7 +133,7 @@ const apiInstance = new .DefaultApi(configuration);
|
|||||||
|
|
||||||
let body:.DefaultApiPetsPatchRequest = {
|
let body:.DefaultApiPetsPatchRequest = {
|
||||||
// Cat | Dog (optional)
|
// Cat | Dog (optional)
|
||||||
catDog: ,
|
catDog: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
apiInstance.petsPatch(body).then((data:any) => {
|
apiInstance.petsPatch(body).then((data:any) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user