forked from loafle/openapi-generator-original
Compare commits
1 Commits
features/f
...
go-server-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bf67a6d49 |
@@ -19,7 +19,7 @@ jobs:
|
||||
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v3.2.0
|
||||
- uses: actions/setup-dotnet@v3.1.0
|
||||
with:
|
||||
dotnet-version: 3.1.*
|
||||
- name: Build
|
||||
|
||||
2
.github/workflows/samples-dotnet.yaml
vendored
2
.github/workflows/samples-dotnet.yaml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v3.2.0
|
||||
- uses: actions/setup-dotnet@v3.1.0
|
||||
with:
|
||||
dotnet-version: '7.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
- samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v3.2.0
|
||||
- uses: actions/setup-dotnet@v3.1.0
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
- samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v3.2.0
|
||||
- uses: actions/setup-dotnet@v3.1.0
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -8,11 +8,4 @@ additionalProperties:
|
||||
snapshotVersion: "true"
|
||||
hideGenerationTimestamp: "true"
|
||||
reactive: "true"
|
||||
# documentation provider should be ignored
|
||||
documentationProvider: "springfox"
|
||||
# annotation provider should be ignored
|
||||
annotationLibrary: "swagger1"
|
||||
# validation should be ignored
|
||||
useBeanValidation: "true"
|
||||
performBeanValidation: "true"
|
||||
|
||||
|
||||
@@ -9,10 +9,3 @@ additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
modelNameSuffix: 'Dto'
|
||||
generatedConstructorWithRequiredArgs: "false"
|
||||
# documentation provider should be ignored
|
||||
documentationProvider: "springdoc"
|
||||
# annotation provider should be ignored
|
||||
annotationLibrary: "swagger2"
|
||||
# validation should be ignored
|
||||
useBeanValidation: "true"
|
||||
performBeanValidation: "true"
|
||||
|
||||
@@ -2736,9 +2736,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
addProperties(allProperties, allRequired, refSchema, new HashSet<>());
|
||||
} else {
|
||||
// composition
|
||||
Map<String, Schema> newProperties = new LinkedHashMap<>();
|
||||
addProperties(newProperties, required, refSchema, new HashSet<>());
|
||||
mergeProperties(properties, newProperties);
|
||||
addProperties(properties, required, refSchema, new HashSet<>());
|
||||
addProperties(allProperties, allRequired, refSchema, new HashSet<>());
|
||||
}
|
||||
}
|
||||
@@ -2814,28 +2812,6 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
// end of code block for composed schema
|
||||
}
|
||||
|
||||
/**
|
||||
* Combines all previously-detected type entries for a schema with newly-discovered ones, to ensure
|
||||
* that schema for items like enum include all possible values.
|
||||
*/
|
||||
private void mergeProperties(Map<String, Schema> existingProperties, Map<String, Schema> newProperties) {
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/12545
|
||||
if (null != existingProperties && null != newProperties) {
|
||||
Schema existingType = existingProperties.get("type");
|
||||
Schema newType = newProperties.get("type");
|
||||
existingProperties.putAll(newProperties);
|
||||
if (null != existingType && null != newType && !newType.getEnum().isEmpty()) {
|
||||
for (Object e : newType.getEnum()) {
|
||||
// ensure all interface enum types are added to schema
|
||||
if (null != existingType.getEnum() && !existingType.getEnum().contains(e)) {
|
||||
existingType.addEnumItemObject(e);
|
||||
}
|
||||
}
|
||||
existingProperties.put("type", existingType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateModelForObject(CodegenModel m, Schema schema) {
|
||||
if (schema.getProperties() != null || schema.getRequired() != null && !(schema instanceof ComposedSchema)) {
|
||||
// passing null to allProperties and allRequired as there's no parent
|
||||
|
||||
@@ -519,13 +519,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> objs) {
|
||||
final Map<String, ModelsMap> processed = super.postProcessAllModels(objs);
|
||||
|
||||
Map<String, CodegenModel> enumRefs = new HashMap<>();
|
||||
for (Map.Entry<String, ModelsMap> entry : processed.entrySet()) {
|
||||
CodegenModel model = ModelUtils.getModelByName(entry.getKey(), processed);
|
||||
if (model.isEnum) {
|
||||
enumRefs.put(model.getClassname(), model);
|
||||
}
|
||||
}
|
||||
// TODO: move the logic of these three methods into patchProperty so all CodegenProperty instances get the same treatment
|
||||
postProcessEnumRefs(processed);
|
||||
updateValueTypeProperty(processed);
|
||||
updateNullableTypeProperty(processed);
|
||||
|
||||
for (Map.Entry<String, ModelsMap> entry : objs.entrySet()) {
|
||||
CodegenModel model = ModelUtils.getModelByName(entry.getKey(), objs);
|
||||
@@ -535,54 +532,34 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
// TODO: why do these collections contain different instances?
|
||||
// fixing allVars should suffice instead of patching every collection
|
||||
for (CodegenProperty property : model.allVars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.vars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.readWriteVars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.optionalVars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.parentVars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.requiredVars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.readOnlyVars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.nonNullableVars) {
|
||||
patchProperty(enumRefs, model, property);
|
||||
patchProperty(model, property);
|
||||
}
|
||||
}
|
||||
return processed;
|
||||
}
|
||||
|
||||
private void patchProperty(Map<String, CodegenModel> enumRefs, CodegenModel model, CodegenProperty property) {
|
||||
if (enumRefs.containsKey(property.dataType)) {
|
||||
// Handle any enum properties referred to by $ref.
|
||||
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
|
||||
// while enums in many other languages are true objects.
|
||||
CodegenModel refModel = enumRefs.get(property.dataType);
|
||||
property.allowableValues = refModel.allowableValues;
|
||||
property.isEnum = true;
|
||||
|
||||
// We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#.
|
||||
property.isPrimitiveType = true;
|
||||
}
|
||||
|
||||
property.isNullable = true;
|
||||
if (!property.isContainer && (nullableType.contains(property.dataType) || property.isEnum)) {
|
||||
property.vendorExtensions.put("x-csharp-value-type", true);
|
||||
property.isNullable = false;
|
||||
}
|
||||
|
||||
property.vendorExtensions.put("x-is-value-type", isValueType(property));
|
||||
|
||||
private void patchProperty(CodegenModel model, CodegenProperty property) {
|
||||
String tmpPropertyName = escapeReservedWord(model, property.name);
|
||||
if (property.name != tmpPropertyName) {
|
||||
// the casing will be wrong if we just set the name to escapeReservedWord
|
||||
@@ -669,6 +646,137 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
return enumVars;
|
||||
}
|
||||
|
||||
/**
|
||||
* C# differs from other languages in that Enums are not _true_ objects; enums are compiled to integral types.
|
||||
* So, in C#, an enum is considers more like a user-defined primitive.
|
||||
* <p>
|
||||
* When working with enums, we can't always assume a RefModel is a nullable type (where default(YourType) == null),
|
||||
* so this post processing runs through all models to find RefModel'd enums. Then, it runs through all vars and modifies
|
||||
* those vars referencing RefModel'd enums to work the same as inlined enums rather than as objects.
|
||||
*
|
||||
* @param models processed models to be further processed for enum references
|
||||
*/
|
||||
private void postProcessEnumRefs(final Map<String, ModelsMap> models) {
|
||||
Map<String, CodegenModel> enumRefs = new HashMap<>();
|
||||
for (Map.Entry<String, ModelsMap> entry : models.entrySet()) {
|
||||
CodegenModel model = ModelUtils.getModelByName(entry.getKey(), models);
|
||||
if (model.isEnum) {
|
||||
enumRefs.put(model.getClassname(), model);
|
||||
}
|
||||
}
|
||||
|
||||
for (String openAPIName : models.keySet()) {
|
||||
CodegenModel model = ModelUtils.getModelByName(openAPIName, models);
|
||||
if (model != null) {
|
||||
for (CodegenProperty var : model.allVars) {
|
||||
if (enumRefs.containsKey(var.dataType)) {
|
||||
// Handle any enum properties referred to by $ref.
|
||||
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
|
||||
// while enums in many other languages are true objects.
|
||||
CodegenModel refModel = enumRefs.get(var.dataType);
|
||||
var.allowableValues = refModel.allowableValues;
|
||||
var.isEnum = true;
|
||||
|
||||
// We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#.
|
||||
var.isPrimitiveType = true;
|
||||
}
|
||||
}
|
||||
for (CodegenProperty var : model.vars) {
|
||||
if (enumRefs.containsKey(var.dataType)) {
|
||||
// Handle any enum properties referred to by $ref.
|
||||
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
|
||||
// while enums in many other languages are true objects.
|
||||
CodegenModel refModel = enumRefs.get(var.dataType);
|
||||
var.allowableValues = refModel.allowableValues;
|
||||
var.isEnum = true;
|
||||
|
||||
// We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#.
|
||||
var.isPrimitiveType = true;
|
||||
}
|
||||
}
|
||||
for (CodegenProperty var : model.readWriteVars) {
|
||||
if (enumRefs.containsKey(var.dataType)) {
|
||||
// Handle any enum properties referred to by $ref.
|
||||
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
|
||||
// while enums in many other languages are true objects.
|
||||
CodegenModel refModel = enumRefs.get(var.dataType);
|
||||
var.allowableValues = refModel.allowableValues;
|
||||
var.isEnum = true;
|
||||
|
||||
// We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#.
|
||||
var.isPrimitiveType = true;
|
||||
}
|
||||
}
|
||||
for (CodegenProperty var : model.readOnlyVars) {
|
||||
if (enumRefs.containsKey(var.dataType)) {
|
||||
// Handle any enum properties referred to by $ref.
|
||||
// This is different in C# than most other generators, because enums in C# are compiled to integral types,
|
||||
// while enums in many other languages are true objects.
|
||||
CodegenModel refModel = enumRefs.get(var.dataType);
|
||||
var.allowableValues = refModel.allowableValues;
|
||||
var.isEnum = true;
|
||||
|
||||
// We do these after updateCodegenPropertyEnum to avoid generalities that don't mesh with C#.
|
||||
var.isPrimitiveType = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Comment out the following as model.dataType is always the model name, eg. OuterIntegerEnum,
|
||||
* and this will fix the integer enum via #9035.
|
||||
* Only x-enum-byte is used in the template but it won't work due to the bug mentioned above.
|
||||
* A better solution is to introduce isLong, isInteger, etc in the DefaultCodegen
|
||||
* so that there is no need for each generator to post-process model enums.
|
||||
*
|
||||
// We're looping all models here.
|
||||
if (model.isEnum) {
|
||||
// We now need to make allowableValues.enumVars look like the context of CodegenProperty
|
||||
Boolean isString = false;
|
||||
Boolean isInteger = false;
|
||||
Boolean isLong = false;
|
||||
Boolean isByte = false;
|
||||
|
||||
if (model.dataType.startsWith("byte")) {
|
||||
// C# Actually supports byte and short enums, swagger spec only supports byte.
|
||||
isByte = true;
|
||||
model.vendorExtensions.put("x-enum-byte", true);
|
||||
} else if (model.dataType.startsWith("int32")) {
|
||||
isInteger = true;
|
||||
model.vendorExtensions.put("x-enum-integer", true);
|
||||
} else if (model.dataType.startsWith("int64")) {
|
||||
isLong = true;
|
||||
model.vendorExtensions.put("x-enum-long", true);
|
||||
} else {
|
||||
// C# doesn't support non-integral enums, so we need to treat everything else as strings (e.g. to not lose precision or data integrity)
|
||||
isString = true;
|
||||
model.vendorExtensions.put("x-enum-string", true);
|
||||
}
|
||||
|
||||
// Since we iterate enumVars for modelInnerEnum and enumClass templates, and CodegenModel is missing some of CodegenProperty's properties,
|
||||
// we can take advantage of Mustache's contextual lookup to add the same "properties" to the model's enumVars scope rather than CodegenProperty's scope.
|
||||
List<Map<String, String>> enumVars = (ArrayList<Map<String, String>>) model.allowableValues.get("enumVars");
|
||||
List<Map<String, Object>> newEnumVars = new ArrayList<Map<String, Object>>();
|
||||
for (Map<String, String> enumVar : enumVars) {
|
||||
Map<String, Object> mixedVars = new HashMap<String, Object>();
|
||||
mixedVars.putAll(enumVar);
|
||||
|
||||
mixedVars.put("isString", isString);
|
||||
mixedVars.put("isLong", isLong);
|
||||
mixedVars.put("isInteger", isInteger);
|
||||
mixedVars.put("isByte", isByte);
|
||||
|
||||
newEnumVars.add(mixedVars);
|
||||
}
|
||||
|
||||
if (!newEnumVars.isEmpty()) {
|
||||
model.allowableValues.put("enumVars", newEnumVars);
|
||||
}
|
||||
} */
|
||||
} else {
|
||||
LOGGER.warn("Expected to retrieve model %s by name, but no model was found. Check your -Dmodels inclusions.", openAPIName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update codegen property's enum by adding "enumVars" (with name and value)
|
||||
*
|
||||
@@ -705,6 +813,49 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update property if it is a C# value type
|
||||
*
|
||||
* @param models list of all models
|
||||
*/
|
||||
protected void updateValueTypeProperty(Map<String, ModelsMap> models) {
|
||||
for (String openAPIName : models.keySet()) {
|
||||
CodegenModel model = ModelUtils.getModelByName(openAPIName, models);
|
||||
if (model != null) {
|
||||
for (CodegenProperty var : model.vars) {
|
||||
var.vendorExtensions.put("x-is-value-type", isValueType(var));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update property if it is a C# nullable type
|
||||
*
|
||||
* @param models list of all models
|
||||
*/
|
||||
protected void updateNullableTypeProperty(Map<String, ModelsMap> models) {
|
||||
for (String openAPIName : models.keySet()) {
|
||||
CodegenModel model = ModelUtils.getModelByName(openAPIName, models);
|
||||
if (model != null) {
|
||||
for (CodegenProperty var : model.vars) {
|
||||
if (!var.isContainer && (nullableType.contains(var.dataType) || var.isEnum)) {
|
||||
var.vendorExtensions.put("x-csharp-value-type", true);
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/12324
|
||||
// we should not need to iterate both vars and allVars
|
||||
// the collections dont have the same instance, so we have to do it again
|
||||
for (CodegenProperty var : model.allVars) {
|
||||
if (!var.isContainer && (nullableType.contains(var.dataType) || var.isEnum)) {
|
||||
var.vendorExtensions.put("x-csharp-value-type", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels) {
|
||||
super.postProcessOperationsWithModels(objs, allModels);
|
||||
@@ -869,7 +1020,6 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
}
|
||||
}
|
||||
|
||||
parameter.isNullable = true;
|
||||
if (model != null) {
|
||||
// Effectively mark enum models as enums and non-nullable
|
||||
if (model.isEnum) {
|
||||
@@ -877,13 +1027,11 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
parameter.allowableValues = model.allowableValues;
|
||||
parameter.isPrimitiveType = true;
|
||||
parameter.vendorExtensions.put("x-csharp-value-type", true);
|
||||
parameter.isNullable = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!parameter.isContainer && nullableType.contains(parameter.dataType)) {
|
||||
parameter.vendorExtensions.put("x-csharp-value-type", true);
|
||||
parameter.isNullable = false;
|
||||
}
|
||||
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
|
||||
@@ -192,6 +192,7 @@ public class GoGinServerCodegen extends AbstractGoCodegen {
|
||||
supportingFiles.add(new SupportingFile("README.mustache", apiPath, "README.md")
|
||||
.doNotOverwrite());
|
||||
supportingFiles.add(new SupportingFile("go.mod.mustache", "go.mod"));
|
||||
supportingFiles.add(new SupportingFile("go.sum.mustache", "go.sum"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -296,6 +296,7 @@ public class GoServerCodegen extends AbstractGoCodegen {
|
||||
supportingFiles.add(new SupportingFile("main.mustache", "", "main.go"));
|
||||
supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile"));
|
||||
supportingFiles.add(new SupportingFile("go.mod.mustache", "", "go.mod"));
|
||||
supportingFiles.add(new SupportingFile("go.sum.mustache", "", "go.sum"));
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("openapi.mustache", "api", "openapi.yaml"));
|
||||
supportingFiles.add(new SupportingFile("routers.mustache", sourceFolder, "routers.go"));
|
||||
|
||||
@@ -295,7 +295,7 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
|
||||
@Override
|
||||
public DocumentationProvider defaultDocumentationProvider() {
|
||||
return isLibrary(SPRING_HTTP_INTERFACE) ? null : DocumentationProvider.SPRINGDOC;
|
||||
return SPRING_HTTP_INTERFACE.equals(library) ? DocumentationProvider.NONE : DocumentationProvider.SPRINGDOC;
|
||||
}
|
||||
|
||||
public List<DocumentationProvider> supportedDocumentationProvider() {
|
||||
@@ -370,21 +370,8 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
documentationProvider = DocumentationProvider.NONE;
|
||||
annotationLibrary = AnnotationLibrary.NONE;
|
||||
useJakartaEe=true;
|
||||
useBeanValidation = false;
|
||||
performBeanValidation = false;
|
||||
|
||||
additionalProperties.put(USE_JAKARTA_EE, useJakartaEe);
|
||||
additionalProperties.put(USE_BEANVALIDATION, useBeanValidation);
|
||||
additionalProperties.put(PERFORM_BEANVALIDATION, performBeanValidation);
|
||||
additionalProperties.put(DOCUMENTATION_PROVIDER, documentationProvider.toCliOptValue());
|
||||
additionalProperties.put(documentationProvider.getPropertyName(), true);
|
||||
additionalProperties.put(ANNOTATION_LIBRARY, annotationLibrary.toCliOptValue());
|
||||
additionalProperties.put(annotationLibrary.getPropertyName(), true);
|
||||
|
||||
applyJakartaPackage();
|
||||
|
||||
LOGGER.warn("For Spring HTTP Interface following options are disabled: documentProvider, annotationLibrary, useBeanValidation, performBeanValidation. "
|
||||
+ "useJakartaEe defaulted to 'true'");
|
||||
}
|
||||
|
||||
if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) {
|
||||
@@ -543,6 +530,7 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
|
||||
typeMapping.put("file", "org.springframework.core.io.Resource");
|
||||
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource");
|
||||
importMapping.put("Pageable", "org.springframework.data.domain.Pageable");
|
||||
importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat");
|
||||
importMapping.put("ApiIgnore", "springfox.documentation.annotations.ApiIgnore");
|
||||
importMapping.put("ParameterObject", "org.springdoc.api.annotations.ParameterObject");
|
||||
@@ -1203,13 +1191,6 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
*/
|
||||
@Override
|
||||
public CodegenOperation fromOperation(String path, String httpMethod, Operation operation, List<Server> servers) {
|
||||
|
||||
// add Pageable import only if x-spring-paginated explicitly used
|
||||
// this allows to use a custom Pageable schema without importing Spring Pageable.
|
||||
if (Boolean.TRUE.equals(operation.getExtensions().get("x-spring-paginated"))) {
|
||||
importMapping.put("Pageable", "org.springframework.data.domain.Pageable");
|
||||
}
|
||||
|
||||
CodegenOperation codegenOperation = super.fromOperation(path, httpMethod, operation, servers);
|
||||
|
||||
// add org.springframework.format.annotation.DateTimeFormat when needed
|
||||
|
||||
@@ -104,14 +104,14 @@ namespace {{modelPackage}}
|
||||
return {{#vars}}{{^isContainer}}
|
||||
(
|
||||
{{name}} == other.{{name}} ||
|
||||
{{#isNullable}}{{name}} != null &&{{/isNullable}}
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&{{/vendorExtensions.x-is-value-type}}
|
||||
{{name}}.Equals(other.{{name}})
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}}
|
||||
(
|
||||
{{name}} == other.{{name}} ||
|
||||
{{#isNullable}}{{name}} != null &&
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&
|
||||
other.{{name}} != null &&
|
||||
{{/isNullable}}{{name}}.SequenceEqual(other.{{name}})
|
||||
{{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(other.{{name}})
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}false{{/vars}};
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace {{modelPackage}}
|
||||
var hashCode = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
{{#vars}}
|
||||
{{#isNullable}}if ({{name}} != null){{/isNullable}}
|
||||
{{^vendorExtensions.x-is-value-type}}if ({{name}} != null){{/vendorExtensions.x-is-value-type}}
|
||||
hashCode = hashCode * 59 + {{name}}.GetHashCode();
|
||||
{{/vars}}
|
||||
return hashCode;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace {{modelPackage}}
|
||||
[MinLength({{minLength}})]{{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}}
|
||||
[MaxLength({{.}})]{{/maxLength}}{{/minLength}}{{#minimum}}{{#maximum}}
|
||||
[Range({{minimum}}, {{maximum}})]{{/maximum}}{{/minimum}}
|
||||
[DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#vendorExtensions.x-csharp-value-type}}true{{/vendorExtensions.x-csharp-value-type}}{{^vendorExtensions.x-csharp-value-type}}false{{/vendorExtensions.x-csharp-value-type}}{{/isNullable}})]
|
||||
[DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}true{{/vendorExtensions.x-is-value-type}}{{^vendorExtensions.x-is-value-type}}false{{/vendorExtensions.x-is-value-type}}{{/isNullable}})]
|
||||
{{#isEnum}}
|
||||
public {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}}
|
||||
{{/isEnum}}
|
||||
@@ -144,14 +144,14 @@ namespace {{modelPackage}}
|
||||
return {{#vars}}{{^isContainer}}
|
||||
(
|
||||
{{name}} == other.{{name}} ||
|
||||
{{#isNullable}}{{name}} != null &&{{/isNullable}}
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&{{/vendorExtensions.x-is-value-type}}
|
||||
{{name}}.Equals(other.{{name}})
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}}
|
||||
(
|
||||
{{name}} == other.{{name}} ||
|
||||
{{#isNullable}}{{name}} != null &&
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&
|
||||
other.{{name}} != null &&
|
||||
{{/isNullable}}{{name}}.SequenceEqual(other.{{name}})
|
||||
{{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(other.{{name}})
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}false{{/vars}};
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace {{modelPackage}}
|
||||
var hashCode = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
{{#vars}}
|
||||
{{#isNullable}}if ({{name}} != null){{/isNullable}}
|
||||
{{^vendorExtensions.x-is-value-type}}if ({{name}} != null){{/vendorExtensions.x-is-value-type}}
|
||||
hashCode = hashCode * 59 + {{name}}.GetHashCode();
|
||||
{{/vars}}
|
||||
return hashCode;
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
{{^vendorExtensions.x-duplicated-data-type}}
|
||||
Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = utf8JsonReader;
|
||||
if (Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, jsonSerializerOptions, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}))
|
||||
return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-csharp-value-type}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-csharp-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-csharp-value-type}} {{/allVars}}{{/lambda.joinWithComma}});
|
||||
return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}.Value{{/vendorExtensions.x-csharp-value-type}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}.Value{{/vendorExtensions.x-csharp-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}.Value{{/vendorExtensions.x-csharp-value-type}} {{/allVars}}{{/lambda.joinWithComma}});
|
||||
|
||||
{{/vendorExtensions.x-duplicated-data-type}}
|
||||
{{#-last}}
|
||||
@@ -186,7 +186,7 @@
|
||||
{{/-last}}
|
||||
{{/composedSchemas.oneOf}}
|
||||
{{^composedSchemas.oneOf}}
|
||||
return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-csharp-value-type}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-csharp-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-csharp-value-type}} {{/allVars}}{{/lambda.joinWithComma}});
|
||||
return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}.Value{{/vendorExtensions.x-csharp-value-type}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}.Value{{/vendorExtensions.x-csharp-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#vendorExtensions.x-csharp-value-type}}.Value{{/vendorExtensions.x-csharp-value-type}} {{/allVars}}{{/lambda.joinWithComma}});
|
||||
{{/composedSchemas.oneOf}}
|
||||
}
|
||||
|
||||
|
||||
@@ -135,14 +135,6 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
}
|
||||
{{#operation}}
|
||||
|
||||
{{#allParams}}
|
||||
{{#-first}}
|
||||
partial void Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{/allParams}});
|
||||
|
||||
{{/-first}}
|
||||
{{/allParams}}
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#-first}}
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -150,7 +142,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// <param name="{{paramName}}"></param>
|
||||
{{/allParams}}
|
||||
/// <returns></returns>
|
||||
private void Validate{{operationId}}({{#requiredAndNotNullableParams}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullableParams}})
|
||||
protected virtual {{^allParams}}void{{/allParams}}{{#allParams}}{{#-first}}{{^-last}}({{/-last}}{{/-first}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{#-last}}{{^-first}}){{/-first}}{{/-last}}{{/allParams}} On{{operationId}}({{#allParams}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{/allParams}})
|
||||
{
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#-first}}
|
||||
@@ -171,14 +163,14 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{/nrt}}
|
||||
{{#-last}}
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
{{/-last}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
return{{#allParams}} {{#-first}}{{^-last}}({{/-last}}{{/-first}}{{paramName}}{{^-last}},{{/-last}}{{#-last}}{{^-first}}){{/-first}}{{/-last}}{{/allParams}};
|
||||
}
|
||||
|
||||
{{/-first}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -239,18 +231,17 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
|
||||
try
|
||||
{
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#-first}}
|
||||
Validate{{operationId}}({{#requiredAndNotNullableParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullableParams}});
|
||||
|
||||
{{/-first}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
{{#allParams}}{{#-first}}{{#-last}}{{paramName}} = {{/-last}}{{^-last}}var validatedParameterLocalVars = {{/-last}}{{/-first}}{{/allParams}}On{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
{{#allParams}}
|
||||
{{#-first}}
|
||||
Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
|
||||
{{^-last}}
|
||||
{{#allParams}}
|
||||
{{paramName}} = validatedParameterLocalVars.Item{{-index}};
|
||||
{{/allParams}}
|
||||
{{/-last}}
|
||||
{{/-first}}
|
||||
{{/allParams}}
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
{{^servers}}
|
||||
|
||||
81
modules/openapi-generator/src/main/resources/go-gin-server/go.sum.mustache
vendored
Normal file
81
modules/openapi-generator/src/main/resources/go-gin-server/go.sum.mustache
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||
github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA=
|
||||
github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
|
||||
github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
|
||||
github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
|
||||
github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA=
|
||||
github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
|
||||
github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU=
|
||||
github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
|
||||
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
|
||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
@@ -1,6 +1,6 @@
|
||||
module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}
|
||||
module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
{{#routers}}
|
||||
{{#mux}}
|
||||
|
||||
2
modules/openapi-generator/src/main/resources/go-server/go.sum.mustache
vendored
Normal file
2
modules/openapi-generator/src/main/resources/go-server/go.sum.mustache
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
@@ -1,4 +1,4 @@
|
||||
aiofiles==23.1.0
|
||||
aiofiles==0.5.0
|
||||
aniso8601==7.0.0
|
||||
async-exit-stack==1.0.1
|
||||
async-generator==1.10
|
||||
@@ -7,13 +7,12 @@ chardet==4.0.0
|
||||
click==7.1.2
|
||||
dnspython==2.1.0
|
||||
email-validator==1.1.2
|
||||
fastapi==0.95.2
|
||||
fastapi==0.65.1
|
||||
graphene==2.1.8
|
||||
graphql-core==2.3.2
|
||||
graphql-relay==2.0.1
|
||||
h11==0.12.0
|
||||
httptools==0.1.2
|
||||
httpx==0.24.1
|
||||
idna==2.10
|
||||
itsdangerous==1.1.0
|
||||
Jinja2==2.11.3
|
||||
@@ -27,7 +26,7 @@ PyYAML==5.4.1
|
||||
requests==2.25.1
|
||||
Rx==1.6.1
|
||||
six==1.16.0
|
||||
starlette==0.27.0
|
||||
starlette==0.25.0
|
||||
typing-extensions==3.10.0.0
|
||||
ujson==4.0.2
|
||||
urllib3==1.26.5
|
||||
|
||||
@@ -199,7 +199,7 @@ class {{classname}}(object):
|
||||
{{/isDateTime}}
|
||||
{{^isDateTime}}
|
||||
{{#isDate}}
|
||||
if isinstance(_params['{{paramName}}'], date):
|
||||
if isinstance(_params['{{paramName}}'], datetime):
|
||||
_query_params.append(('{{baseName}}', _params['{{paramName}}'].strftime(self.api_client.configuration.date_format)))
|
||||
else:
|
||||
_query_params.append(('{{baseName}}', _params['{{paramName}}']))
|
||||
|
||||
@@ -640,36 +640,6 @@ public class DefaultCodegenTest {
|
||||
Assert.assertEquals(type, "oneOf<ObjA,ObjB>");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOneOfEnum() {
|
||||
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue12545.json");
|
||||
final DefaultCodegen codegen = new DefaultCodegen();
|
||||
String modelName = "petItems";
|
||||
|
||||
final Schema schema = openAPI.getComponents().getSchemas().get(modelName);
|
||||
codegen.setOpenAPI(openAPI);
|
||||
CodegenModel petItems = codegen.fromModel(modelName, schema);
|
||||
|
||||
Set<String> oneOf = new TreeSet<String>();
|
||||
oneOf.add("Dog");
|
||||
oneOf.add("Cat");
|
||||
Assert.assertEquals(petItems.oneOf, oneOf);
|
||||
// make sure that animal has the property type
|
||||
boolean typeSeen = false;
|
||||
boolean typeContainsEnums = false;
|
||||
for (CodegenProperty cp : petItems.vars) {
|
||||
if ("type".equals(cp.name)) {
|
||||
typeSeen = true;
|
||||
if (null != cp.get_enum() && cp.get_enum().contains("dog") && cp.get_enum().contains("cat")) {
|
||||
typeContainsEnums = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
Assert.assertTrue(typeSeen);
|
||||
Assert.assertTrue(typeContainsEnums);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testComposedSchemaOneOfWithProperties() {
|
||||
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/oneOf.yaml");
|
||||
|
||||
@@ -1385,6 +1385,7 @@ public class SpringCodegenTest {
|
||||
final SpringCodegen codegen = new SpringCodegen();
|
||||
codegen.processOpts();
|
||||
Assert.assertEquals(codegen.importMapping().get("org.springframework.core.io.Resource"), "org.springframework.core.io.Resource");
|
||||
Assert.assertEquals(codegen.importMapping().get("Pageable"), "org.springframework.data.domain.Pageable");
|
||||
Assert.assertEquals(codegen.importMapping().get("DateTimeFormat"), "org.springframework.format.annotation.DateTimeFormat");
|
||||
Assert.assertEquals(codegen.importMapping().get("ApiIgnore"), "springfox.documentation.annotations.ApiIgnore");
|
||||
Assert.assertEquals(codegen.importMapping().get("ParameterObject"), "org.springdoc.api.annotations.ParameterObject");
|
||||
@@ -1780,31 +1781,13 @@ public class SpringCodegenTest {
|
||||
files = generateFromContract("src/test/resources/2_0/petstore-with-spring-pageable.yaml", SPRING_BOOT, additionalProperties);
|
||||
|
||||
JavaFileAssert.assertThat(files.get("PetApi.java"))
|
||||
.hasImports("org.springdoc.core.annotations.ParameterObject", "org.springframework.data.domain.Pageable")
|
||||
.hasImports("org.springdoc.core.annotations.ParameterObject")
|
||||
.assertMethod("findPetsByStatus")
|
||||
.hasParameter("pageable").withType("Pageable")
|
||||
.assertParameterAnnotations()
|
||||
.containsWithName("ParameterObject");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void paramPageableIsNotSpringPaginated_issue13052() throws Exception {
|
||||
Map<String, Object> additionalProperties = new HashMap<>();
|
||||
additionalProperties.put(SpringCodegen.USE_TAGS, "true");
|
||||
additionalProperties.put(DOCUMENTATION_PROVIDER, "springdoc");
|
||||
additionalProperties.put(SpringCodegen.INTERFACE_ONLY, "true");
|
||||
additionalProperties.put(SpringCodegen.SKIP_DEFAULT_INTERFACE, "true");
|
||||
additionalProperties.put(USE_SPRING_BOOT3, "true");
|
||||
|
||||
Map<String, File> files = generateFromContract("src/test/resources/bugs/issue_13052.yaml", SPRING_BOOT, additionalProperties);
|
||||
|
||||
JavaFileAssert.assertThat(files.get("PetApi.java"))
|
||||
.hasImports("org.openapitools.model.Pageable")
|
||||
.hasNoImports("org.springframework.data.domain.Pageable", "org.springdoc.core.annotations.ParameterObject")
|
||||
.assertMethod("findPageable")
|
||||
.hasParameter("pageable").withType("Pageable");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldSetDefaultValueForMultipleArrayItems() throws IOException {
|
||||
Map<String, Object> additionalProperties = new HashMap<>();
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": {
|
||||
"version": "1.0.0",
|
||||
"title": "OpenAPI Petstore"
|
||||
},
|
||||
"paths": {
|
||||
"/": {
|
||||
"get": {
|
||||
"description": "get all pets in a household",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "successful operation",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Household"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Household": {
|
||||
"title": "Household",
|
||||
"type" : "object",
|
||||
"required": [
|
||||
"pets"
|
||||
],
|
||||
"properties": {
|
||||
"pets": {
|
||||
"type": "array",
|
||||
"title": "pets",
|
||||
"items" : {
|
||||
"title": "petItems",
|
||||
"oneOf" : [ {
|
||||
"$ref" : "#/components/schemas/Dog"
|
||||
}, {
|
||||
"$ref" : "#/components/schemas/Cat"
|
||||
} ]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Dog": {
|
||||
"type" : "object",
|
||||
"title": "Dog",
|
||||
"properties" : {
|
||||
"type" : {
|
||||
"type" : "string",
|
||||
"enum" : [ "dog" ]
|
||||
}
|
||||
},
|
||||
"required" : [ "type" ]
|
||||
},
|
||||
"Cat": {
|
||||
"type" : "object",
|
||||
"title": "Cat",
|
||||
"properties" : {
|
||||
"type" : {
|
||||
"type" : "string",
|
||||
"enum" : [ "cat" ]
|
||||
}
|
||||
},
|
||||
"required" : [ "type" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: OpenAPI Petstore
|
||||
description: This is a sample server Petstore server. For this sample, you can use
|
||||
the api key `special-key` to test the authorization filters.
|
||||
license:
|
||||
name: Apache-2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: http://petstore.swagger.io/v2
|
||||
tags:
|
||||
- name: pet
|
||||
description: Everything about your Pets
|
||||
- name: store
|
||||
description: Access to Petstore orders
|
||||
- name: user
|
||||
description: Operations about user
|
||||
paths:
|
||||
/pet/findPageable:
|
||||
get:
|
||||
tags:
|
||||
- pet
|
||||
summary: Finds Pets by status
|
||||
description: Multiple status values can be provided with comma separated strings
|
||||
operationId: findPageable
|
||||
parameters:
|
||||
- name: pageable
|
||||
in: query
|
||||
style: form
|
||||
explode: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pageable"
|
||||
responses:
|
||||
200:
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
400:
|
||||
description: Invalid status value
|
||||
content: {}
|
||||
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Pageable:
|
||||
type: object
|
||||
properties:
|
||||
page:
|
||||
type: integer
|
||||
description: page number
|
||||
size:
|
||||
type: integer
|
||||
description: page size
|
||||
@@ -305,7 +305,7 @@ class QueryApi(object):
|
||||
_query_params.append(('datetime_query', _params['datetime_query']))
|
||||
|
||||
if _params.get('date_query') is not None: # noqa: E501
|
||||
if isinstance(_params['date_query'], date):
|
||||
if isinstance(_params['date_query'], datetime):
|
||||
_query_params.append(('date_query', _params['date_query'].strftime(self.api_client.configuration.date_format)))
|
||||
else:
|
||||
_query_params.append(('date_query', _params['date_query']))
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Many files
|
||||
/// </summary>
|
||||
/// <value>Many files</value>
|
||||
[DataMember(Name = "files", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "files", EmitDefaultValue = false)]
|
||||
public List<System.IO.Stream> Files { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Marker
|
||||
/// </summary>
|
||||
[DataMember(Name = "marker", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "marker", EmitDefaultValue = false)]
|
||||
public MultipartMixedRequestMarker Marker { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets StatusArray
|
||||
/// </summary>
|
||||
[DataMember(Name = "statusArray", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "statusArray", EmitDefaultValue = false)]
|
||||
public List<MultipartMixedStatus> StatusArray { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// One file
|
||||
/// </summary>
|
||||
/// <value>One file</value>
|
||||
[DataMember(Name = "file", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "file", EmitDefaultValue = false)]
|
||||
public System.IO.Stream File { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -35,13 +35,13 @@ namespace Org.OpenAPITools.Models
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name="type", EmitDefaultValue=true)]
|
||||
[DataMember(Name="type", EmitDefaultValue=false)]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Message
|
||||
/// </summary>
|
||||
[DataMember(Name="message", EmitDefaultValue=true)]
|
||||
[DataMember(Name="message", EmitDefaultValue=false)]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Models
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[RegularExpression("^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")]
|
||||
[DataMember(Name="name", EmitDefaultValue=true)]
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -35,27 +35,27 @@ namespace Org.OpenAPITools.Models
|
||||
/// <summary>
|
||||
/// Gets or Sets Category
|
||||
/// </summary>
|
||||
[DataMember(Name="category", EmitDefaultValue=true)]
|
||||
[DataMember(Name="category", EmitDefaultValue=false)]
|
||||
public Category Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[Required]
|
||||
[DataMember(Name="name", EmitDefaultValue=true)]
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PhotoUrls
|
||||
/// </summary>
|
||||
[Required]
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=true)]
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=false)]
|
||||
public List<string> PhotoUrls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Tags
|
||||
/// </summary>
|
||||
[DataMember(Name="tags", EmitDefaultValue=true)]
|
||||
[DataMember(Name="tags", EmitDefaultValue=false)]
|
||||
public List<Tag> Tags { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Models
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name="name", EmitDefaultValue=true)]
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -35,37 +35,37 @@ namespace Org.OpenAPITools.Models
|
||||
/// <summary>
|
||||
/// Gets or Sets Username
|
||||
/// </summary>
|
||||
[DataMember(Name="username", EmitDefaultValue=true)]
|
||||
[DataMember(Name="username", EmitDefaultValue=false)]
|
||||
public string Username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets FirstName
|
||||
/// </summary>
|
||||
[DataMember(Name="firstName", EmitDefaultValue=true)]
|
||||
[DataMember(Name="firstName", EmitDefaultValue=false)]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[DataMember(Name="lastName", EmitDefaultValue=true)]
|
||||
[DataMember(Name="lastName", EmitDefaultValue=false)]
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Email
|
||||
/// </summary>
|
||||
[DataMember(Name="email", EmitDefaultValue=true)]
|
||||
[DataMember(Name="email", EmitDefaultValue=false)]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Password
|
||||
/// </summary>
|
||||
[DataMember(Name="password", EmitDefaultValue=true)]
|
||||
[DataMember(Name="password", EmitDefaultValue=false)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Phone
|
||||
/// </summary>
|
||||
[DataMember(Name="phone", EmitDefaultValue=true)]
|
||||
[DataMember(Name="phone", EmitDefaultValue=false)]
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ActivityOutputs
|
||||
/// </summary>
|
||||
[DataMember(Name = "activity_outputs", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "activity_outputs", EmitDefaultValue = false)]
|
||||
public Dictionary<string, List<ActivityOutputElementRepresentation>> ActivityOutputs
|
||||
{
|
||||
get{ return _ActivityOutputs;}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Prop1
|
||||
/// </summary>
|
||||
[DataMember(Name = "prop1", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "prop1", EmitDefaultValue = false)]
|
||||
public string Prop1
|
||||
{
|
||||
get{ return _Prop1;}
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Prop2
|
||||
/// </summary>
|
||||
[DataMember(Name = "prop2", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "prop2", EmitDefaultValue = false)]
|
||||
public Object Prop2
|
||||
{
|
||||
get{ return _Prop2;}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_property", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_property", EmitDefaultValue = false)]
|
||||
public Dictionary<string, string> MapProperty
|
||||
{
|
||||
get{ return _MapProperty;}
|
||||
@@ -115,7 +115,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapOfMapProperty
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_of_map_property", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_of_map_property", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Dictionary<string, string>> MapOfMapProperty
|
||||
{
|
||||
get{ return _MapOfMapProperty;}
|
||||
@@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype1
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = false)]
|
||||
public Object MapWithUndeclaredPropertiesAnytype1
|
||||
{
|
||||
get{ return _MapWithUndeclaredPropertiesAnytype1;}
|
||||
@@ -187,7 +187,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype2
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = false)]
|
||||
public Object MapWithUndeclaredPropertiesAnytype2
|
||||
{
|
||||
get{ return _MapWithUndeclaredPropertiesAnytype2;}
|
||||
@@ -211,7 +211,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype3
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Object> MapWithUndeclaredPropertiesAnytype3
|
||||
{
|
||||
get{ return _MapWithUndeclaredPropertiesAnytype3;}
|
||||
@@ -236,7 +236,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// an object with no declared properties and no undeclared properties, hence it's an empty map.
|
||||
/// </summary>
|
||||
/// <value>an object with no declared properties and no undeclared properties, hence it's an empty map.</value>
|
||||
[DataMember(Name = "empty_map", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "empty_map", EmitDefaultValue = false)]
|
||||
public Object EmptyMap
|
||||
{
|
||||
get{ return _EmptyMap;}
|
||||
@@ -260,7 +260,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesString
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = false)]
|
||||
public Dictionary<string, string> MapWithUndeclaredPropertiesString
|
||||
{
|
||||
get{ return _MapWithUndeclaredPropertiesString;}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Color
|
||||
/// </summary>
|
||||
[DataMember(Name = "color", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "color", EmitDefaultValue = false)]
|
||||
public string Color
|
||||
{
|
||||
get{ return _Color;}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name = "type", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "type", EmitDefaultValue = false)]
|
||||
public string Type
|
||||
{
|
||||
get{ return _Type;}
|
||||
@@ -109,7 +109,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Message
|
||||
/// </summary>
|
||||
[DataMember(Name = "message", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "message", EmitDefaultValue = false)]
|
||||
public string Message
|
||||
{
|
||||
get{ return _Message;}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Cultivar
|
||||
/// </summary>
|
||||
[DataMember(Name = "cultivar", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "cultivar", EmitDefaultValue = false)]
|
||||
public string Cultivar
|
||||
{
|
||||
get{ return _Cultivar;}
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Origin
|
||||
/// </summary>
|
||||
[DataMember(Name = "origin", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "origin", EmitDefaultValue = false)]
|
||||
public string Origin
|
||||
{
|
||||
get{ return _Origin;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayNumber
|
||||
/// </summary>
|
||||
[DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)]
|
||||
public List<List<decimal>> ArrayArrayNumber
|
||||
{
|
||||
get{ return _ArrayArrayNumber;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayNumber
|
||||
/// </summary>
|
||||
[DataMember(Name = "ArrayNumber", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "ArrayNumber", EmitDefaultValue = false)]
|
||||
public List<decimal> ArrayNumber
|
||||
{
|
||||
get{ return _ArrayNumber;}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayOfString
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_of_string", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "array_of_string", EmitDefaultValue = false)]
|
||||
public List<string> ArrayOfString
|
||||
{
|
||||
get{ return _ArrayOfString;}
|
||||
@@ -85,7 +85,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfInteger
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_array_of_integer", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "array_array_of_integer", EmitDefaultValue = false)]
|
||||
public List<List<long>> ArrayArrayOfInteger
|
||||
{
|
||||
get{ return _ArrayArrayOfInteger;}
|
||||
@@ -109,7 +109,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfModel
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_array_of_model", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "array_array_of_model", EmitDefaultValue = false)]
|
||||
public List<List<ReadOnlyFirst>> ArrayArrayOfModel
|
||||
{
|
||||
get{ return _ArrayArrayOfModel;}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets SmallCamel
|
||||
/// </summary>
|
||||
[DataMember(Name = "smallCamel", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "smallCamel", EmitDefaultValue = false)]
|
||||
public string SmallCamel
|
||||
{
|
||||
get{ return _SmallCamel;}
|
||||
@@ -103,7 +103,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets CapitalCamel
|
||||
/// </summary>
|
||||
[DataMember(Name = "CapitalCamel", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "CapitalCamel", EmitDefaultValue = false)]
|
||||
public string CapitalCamel
|
||||
{
|
||||
get{ return _CapitalCamel;}
|
||||
@@ -127,7 +127,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets SmallSnake
|
||||
/// </summary>
|
||||
[DataMember(Name = "small_Snake", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "small_Snake", EmitDefaultValue = false)]
|
||||
public string SmallSnake
|
||||
{
|
||||
get{ return _SmallSnake;}
|
||||
@@ -151,7 +151,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets CapitalSnake
|
||||
/// </summary>
|
||||
[DataMember(Name = "Capital_Snake", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "Capital_Snake", EmitDefaultValue = false)]
|
||||
public string CapitalSnake
|
||||
{
|
||||
get{ return _CapitalSnake;}
|
||||
@@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets SCAETHFlowPoints
|
||||
/// </summary>
|
||||
[DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = false)]
|
||||
public string SCAETHFlowPoints
|
||||
{
|
||||
get{ return _SCAETHFlowPoints;}
|
||||
@@ -200,7 +200,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Name of the pet
|
||||
/// </summary>
|
||||
/// <value>Name of the pet </value>
|
||||
[DataMember(Name = "ATT_NAME", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "ATT_NAME", EmitDefaultValue = false)]
|
||||
public string ATT_NAME
|
||||
{
|
||||
get{ return _ATT_NAME;}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarClass
|
||||
/// </summary>
|
||||
[DataMember(Name = "_class", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "_class", EmitDefaultValue = false)]
|
||||
public string VarClass
|
||||
{
|
||||
get{ return _VarClass;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Breed
|
||||
/// </summary>
|
||||
[DataMember(Name = "breed", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "breed", EmitDefaultValue = false)]
|
||||
public string Breed
|
||||
{
|
||||
get{ return _Breed;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Breed
|
||||
/// </summary>
|
||||
[DataMember(Name = "breed", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "breed", EmitDefaultValue = false)]
|
||||
public string Breed
|
||||
{
|
||||
get{ return _Breed;}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MainShape
|
||||
/// </summary>
|
||||
[DataMember(Name = "mainShape", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "mainShape", EmitDefaultValue = false)]
|
||||
public Shape MainShape
|
||||
{
|
||||
get{ return _MainShape;}
|
||||
@@ -90,7 +90,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeOrNull
|
||||
/// </summary>
|
||||
[DataMember(Name = "shapeOrNull", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "shapeOrNull", EmitDefaultValue = false)]
|
||||
public ShapeOrNull ShapeOrNull
|
||||
{
|
||||
get{ return _ShapeOrNull;}
|
||||
@@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Shapes
|
||||
/// </summary>
|
||||
[DataMember(Name = "shapes", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "shapes", EmitDefaultValue = false)]
|
||||
public List<Shape> Shapes
|
||||
{
|
||||
get{ return _Shapes;}
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayEnum
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_enum", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "array_enum", EmitDefaultValue = false)]
|
||||
public List<EnumArrays.ArrayEnumEnum> ArrayEnum
|
||||
{
|
||||
get{ return _ArrayEnum;}
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets OuterEnum
|
||||
/// </summary>
|
||||
|
||||
[DataMember(Name = "outerEnum", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "outerEnum", EmitDefaultValue = true)]
|
||||
public OuterEnum? OuterEnum
|
||||
{
|
||||
get{ return _OuterEnum;}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Test capitalization
|
||||
/// </summary>
|
||||
/// <value>Test capitalization</value>
|
||||
[DataMember(Name = "sourceURI", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "sourceURI", EmitDefaultValue = false)]
|
||||
public string SourceURI
|
||||
{
|
||||
get{ return _SourceURI;}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets File
|
||||
/// </summary>
|
||||
[DataMember(Name = "file", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "file", EmitDefaultValue = false)]
|
||||
public File File
|
||||
{
|
||||
get{ return _File;}
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Files
|
||||
/// </summary>
|
||||
[DataMember(Name = "files", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "files", EmitDefaultValue = false)]
|
||||
public List<File> Files
|
||||
{
|
||||
get{ return _Files;}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name = "bar", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "bar", EmitDefaultValue = false)]
|
||||
public string Bar
|
||||
{
|
||||
get{ return _Bar;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarString
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo VarString
|
||||
{
|
||||
get{ return _VarString;}
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarString
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public string VarString
|
||||
{
|
||||
get{ return _VarString;}
|
||||
@@ -423,7 +423,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
/// </summary>
|
||||
[DataMember(Name = "binary", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "binary", EmitDefaultValue = false)]
|
||||
public System.IO.Stream Binary
|
||||
{
|
||||
get{ return _Binary;}
|
||||
@@ -548,7 +548,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// A string that is a 10 digit number. Can have leading zeros.
|
||||
/// </summary>
|
||||
/// <value>A string that is a 10 digit number. Can have leading zeros.</value>
|
||||
[DataMember(Name = "pattern_with_digits", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "pattern_with_digits", EmitDefaultValue = false)]
|
||||
public string PatternWithDigits
|
||||
{
|
||||
get{ return _PatternWithDigits;}
|
||||
@@ -573,7 +573,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
|
||||
/// </summary>
|
||||
/// <value>A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.</value>
|
||||
[DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = false)]
|
||||
public string PatternWithDigitsAndDelimiter
|
||||
{
|
||||
get{ return _PatternWithDigitsAndDelimiter;}
|
||||
@@ -598,7 +598,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name = "pattern_with_backslash", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "pattern_with_backslash", EmitDefaultValue = false)]
|
||||
public string PatternWithBackslash
|
||||
{
|
||||
get{ return _PatternWithBackslash;}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name = "bar", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "bar", EmitDefaultValue = false)]
|
||||
public string Bar { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Foo
|
||||
/// </summary>
|
||||
[DataMember(Name = "foo", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "foo", EmitDefaultValue = false)]
|
||||
public string Foo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets var123List
|
||||
/// </summary>
|
||||
[DataMember(Name = "123-list", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "123-list", EmitDefaultValue = false)]
|
||||
public string var123List
|
||||
{
|
||||
get{ return _var123List;}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets EscapedLiteralString
|
||||
/// </summary>
|
||||
[DataMember(Name = "escapedLiteralString", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)]
|
||||
public string EscapedLiteralString
|
||||
{
|
||||
get{ return _EscapedLiteralString;}
|
||||
@@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets UnescapedLiteralString
|
||||
/// </summary>
|
||||
[DataMember(Name = "unescapedLiteralString", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)]
|
||||
public string UnescapedLiteralString
|
||||
{
|
||||
get{ return _UnescapedLiteralString;}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapMapOfString
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_map_of_string", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_map_of_string", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Dictionary<string, string>> MapMapOfString
|
||||
{
|
||||
get{ return _MapMapOfString;}
|
||||
@@ -110,7 +110,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MapOfEnumString
|
||||
/// </summary>
|
||||
[DataMember(Name = "map_of_enum_string", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map_of_enum_string", EmitDefaultValue = false)]
|
||||
public Dictionary<string, MapTest.InnerEnum> MapOfEnumString
|
||||
{
|
||||
get{ return _MapOfEnumString;}
|
||||
@@ -134,7 +134,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets DirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name = "direct_map", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "direct_map", EmitDefaultValue = false)]
|
||||
public Dictionary<string, bool> DirectMap
|
||||
{
|
||||
get{ return _DirectMap;}
|
||||
@@ -158,7 +158,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets IndirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name = "indirect_map", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "indirect_map", EmitDefaultValue = false)]
|
||||
public Dictionary<string, bool> IndirectMap
|
||||
{
|
||||
get{ return _IndirectMap;}
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Map
|
||||
/// </summary>
|
||||
[DataMember(Name = "map", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "map", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Animal> Map
|
||||
{
|
||||
get{ return _Map;}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarClass
|
||||
/// </summary>
|
||||
[DataMember(Name = "class", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "class", EmitDefaultValue = false)]
|
||||
public string VarClass
|
||||
{
|
||||
get{ return _VarClass;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets varClient
|
||||
/// </summary>
|
||||
[DataMember(Name = "client", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "client", EmitDefaultValue = false)]
|
||||
public string varClient
|
||||
{
|
||||
get{ return _varClient;}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Property
|
||||
/// </summary>
|
||||
[DataMember(Name = "property", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "property", EmitDefaultValue = false)]
|
||||
public string Property
|
||||
{
|
||||
get{ return _Property;}
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayItemsNullable
|
||||
/// </summary>
|
||||
[DataMember(Name = "array_items_nullable", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "array_items_nullable", EmitDefaultValue = false)]
|
||||
public List<Object> ArrayItemsNullable
|
||||
{
|
||||
get{ return _ArrayItemsNullable;}
|
||||
@@ -379,7 +379,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ObjectItemsNullable
|
||||
/// </summary>
|
||||
[DataMember(Name = "object_items_nullable", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "object_items_nullable", EmitDefaultValue = false)]
|
||||
public Dictionary<string, Object> ObjectItemsNullable
|
||||
{
|
||||
get{ return _ObjectItemsNullable;}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Uuid
|
||||
/// </summary>
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = false)]
|
||||
public string Uuid
|
||||
{
|
||||
get{ return _Uuid;}
|
||||
@@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets DeprecatedRef
|
||||
/// </summary>
|
||||
[DataMember(Name = "deprecatedRef", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "deprecatedRef", EmitDefaultValue = false)]
|
||||
[Obsolete]
|
||||
public DeprecatedObject DeprecatedRef
|
||||
{
|
||||
@@ -141,7 +141,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Bars
|
||||
/// </summary>
|
||||
[DataMember(Name = "bars", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "bars", EmitDefaultValue = false)]
|
||||
[Obsolete]
|
||||
public List<string> Bars
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MyString
|
||||
/// </summary>
|
||||
[DataMember(Name = "my_string", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "my_string", EmitDefaultValue = false)]
|
||||
public string MyString
|
||||
{
|
||||
get{ return _MyString;}
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Category
|
||||
/// </summary>
|
||||
[DataMember(Name = "category", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "category", EmitDefaultValue = false)]
|
||||
public Category Category
|
||||
{
|
||||
get{ return _Category;}
|
||||
@@ -239,7 +239,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Tags
|
||||
/// </summary>
|
||||
[DataMember(Name = "tags", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "tags", EmitDefaultValue = false)]
|
||||
public List<Tag> Tags
|
||||
{
|
||||
get{ return _Tags;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name = "bar", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "bar", EmitDefaultValue = false)]
|
||||
public string Bar { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -63,7 +63,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Baz
|
||||
/// </summary>
|
||||
[DataMember(Name = "baz", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "baz", EmitDefaultValue = false)]
|
||||
public string Baz
|
||||
{
|
||||
get{ return _Baz;}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarSpecialModelName
|
||||
/// </summary>
|
||||
[DataMember(Name = "_special_model.name_", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "_special_model.name_", EmitDefaultValue = false)]
|
||||
public string VarSpecialModelName
|
||||
{
|
||||
get{ return _VarSpecialModelName;}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Value
|
||||
/// </summary>
|
||||
[DataMember(Name = "value", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "value", EmitDefaultValue = false)]
|
||||
public string Value
|
||||
{
|
||||
get{ return _Value;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets TestCollectionEndingWithWordList
|
||||
/// </summary>
|
||||
[DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)]
|
||||
public List<TestCollectionEndingWithWordList> TestCollectionEndingWithWordList
|
||||
{
|
||||
get{ return _TestCollectionEndingWithWordList;}
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Username
|
||||
/// </summary>
|
||||
[DataMember(Name = "username", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "username", EmitDefaultValue = false)]
|
||||
public string Username
|
||||
{
|
||||
get{ return _Username;}
|
||||
@@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets FirstName
|
||||
/// </summary>
|
||||
[DataMember(Name = "firstName", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "firstName", EmitDefaultValue = false)]
|
||||
public string FirstName
|
||||
{
|
||||
get{ return _FirstName;}
|
||||
@@ -187,7 +187,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[DataMember(Name = "lastName", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "lastName", EmitDefaultValue = false)]
|
||||
public string LastName
|
||||
{
|
||||
get{ return _LastName;}
|
||||
@@ -211,7 +211,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Email
|
||||
/// </summary>
|
||||
[DataMember(Name = "email", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "email", EmitDefaultValue = false)]
|
||||
public string Email
|
||||
{
|
||||
get{ return _Email;}
|
||||
@@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Password
|
||||
/// </summary>
|
||||
[DataMember(Name = "password", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "password", EmitDefaultValue = false)]
|
||||
public string Password
|
||||
{
|
||||
get{ return _Password;}
|
||||
@@ -259,7 +259,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Phone
|
||||
/// </summary>
|
||||
[DataMember(Name = "phone", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "phone", EmitDefaultValue = false)]
|
||||
public string Phone
|
||||
{
|
||||
get{ return _Phone;}
|
||||
@@ -309,7 +309,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.
|
||||
/// </summary>
|
||||
/// <value>test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.</value>
|
||||
[DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = true)]
|
||||
[DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = false)]
|
||||
public Object ObjectWithNoDeclaredProps
|
||||
{
|
||||
get{ return _ObjectWithNoDeclaredProps;}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<ModelClient>></returns>
|
||||
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// To test special tags
|
||||
@@ -50,7 +50,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>ModelClient>?></returns>
|
||||
Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,14 +128,12 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
partial void FormatCall123TestSpecialTags(ModelClient? modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="modelClient"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateCall123TestSpecialTags(ModelClient modelClient)
|
||||
protected virtual ModelClient OnCall123TestSpecialTags(ModelClient modelClient)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -143,8 +141,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (modelClient == null)
|
||||
throw new ArgumentNullException(nameof(modelClient));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return modelClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void AfterCall123TestSpecialTags(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient? modelClient)
|
||||
protected virtual void AfterCall123TestSpecialTags(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient modelClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient? modelClient)
|
||||
protected virtual void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -193,15 +193,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateCall123TestSpecialTags(modelClient);
|
||||
|
||||
FormatCall123TestSpecialTags(modelClient);
|
||||
modelClient = OnCall123TestSpecialTags(modelClient);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> GetCountryAsync(string? country = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> GetCountryAsync(string country, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -71,7 +71,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> GetCountryOrDefaultAsync(string? country = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Hello
|
||||
@@ -170,6 +170,15 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnFooGet()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -218,6 +227,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnFooGet();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -263,14 +274,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetCountry(ref string? country);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="country"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateGetCountry(string country)
|
||||
protected virtual string OnGetCountry(string country)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -278,8 +287,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (country == null)
|
||||
throw new ArgumentNullException(nameof(country));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return country;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -287,7 +298,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="country"></param>
|
||||
protected virtual void AfterGetCountry(ApiResponse<object> apiResponseLocalVar, string? country)
|
||||
protected virtual void AfterGetCountry(ApiResponse<object> apiResponseLocalVar, string country)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -298,7 +309,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="country"></param>
|
||||
protected virtual void OnErrorGetCountry(Exception exception, string pathFormat, string path, string? country)
|
||||
protected virtual void OnErrorGetCountry(Exception exception, string pathFormat, string path, string country)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -309,7 +320,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> GetCountryOrDefaultAsync(string? country = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> GetCountryOrDefaultAsync(string country, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -328,15 +339,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="country"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> GetCountryAsync(string? country = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> GetCountryAsync(string country, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateGetCountry(country);
|
||||
|
||||
FormatGetCountry(ref country);
|
||||
country = OnGetCountry(country);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -393,6 +402,15 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnHello()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -441,6 +459,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnHello();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestBodyWithFileSchemaAsync(FileSchemaTestClass? fileSchemaTestClass = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -186,7 +186,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass? fileSchemaTestClass = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -199,7 +199,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestBodyWithQueryParamsAsync(User? user = null, string? query = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -211,7 +211,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestBodyWithQueryParamsOrDefaultAsync(User? user = null, string? query = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// To test \"client\" model
|
||||
@@ -223,7 +223,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<ModelClient>></returns>
|
||||
Task<ApiResponse<ModelClient>> TestClientModelAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>> TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// To test \"client\" model
|
||||
@@ -234,7 +234,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>ModelClient>?></returns>
|
||||
Task<ApiResponse<ModelClient>?> TestClientModelOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>?> TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -259,7 +259,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="dateTime">None (optional, default to "2010-02-01T10:20:10.111110+01:00")</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestEndpointParametersAsync(byte[]? varByte = null, decimal number, double varDouble, string? patternWithoutDelimiter = null, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestEndpointParametersAsync(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -283,7 +283,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="dateTime">None (optional, default to "2010-02-01T10:20:10.111110+01:00")</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestEndpointParametersOrDefaultAsync(byte[]? varByte = null, decimal number, double varDouble, string? patternWithoutDelimiter = null, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestEndpointParametersOrDefaultAsync(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// To test enum parameters
|
||||
@@ -365,7 +365,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestInlineAdditionalPropertiesAsync(Dictionary<string, string>? requestBody = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestInlineAdditionalPropertiesAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test inline additionalProperties
|
||||
@@ -376,7 +376,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string>? requestBody = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
@@ -389,7 +389,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="param2">field2</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestJsonFormDataAsync(string? param = null, string? param2 = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test json serialization of form data
|
||||
@@ -401,7 +401,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="param2">field2</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestJsonFormDataOrDefaultAsync(string? param = null, string? param2 = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -417,7 +417,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="context"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> TestQueryParameterCollectionFormatAsync(List<string>? pipe = null, List<string>? ioutil = null, List<string>? http = null, List<string>? url = null, List<string>? context = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestQueryParameterCollectionFormatAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -432,7 +432,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="context"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> TestQueryParameterCollectionFormatOrDefaultAsync(List<string>? pipe = null, List<string>? ioutil = null, List<string>? http = null, List<string>? url = null, List<string>? context = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,6 +510,15 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnFakeHealthGet()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -558,6 +567,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnFakeHealthGet();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -603,7 +614,15 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFakeOuterBooleanSerialize(ref bool? body);
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual bool? OnFakeOuterBooleanSerialize(bool? body)
|
||||
{
|
||||
return body;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@@ -657,7 +676,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
FormatFakeOuterBooleanSerialize(ref body);
|
||||
body = OnFakeOuterBooleanSerialize(body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -717,7 +736,15 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFakeOuterCompositeSerialize(OuterComposite? outerComposite);
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="outerComposite"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual OuterComposite? OnFakeOuterCompositeSerialize(OuterComposite? outerComposite)
|
||||
{
|
||||
return outerComposite;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@@ -771,7 +798,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
FormatFakeOuterCompositeSerialize(outerComposite);
|
||||
outerComposite = OnFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -831,7 +858,15 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFakeOuterNumberSerialize(ref decimal? body);
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual decimal? OnFakeOuterNumberSerialize(decimal? body)
|
||||
{
|
||||
return body;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@@ -885,7 +920,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
FormatFakeOuterNumberSerialize(ref body);
|
||||
body = OnFakeOuterNumberSerialize(body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -945,15 +980,13 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFakeOuterStringSerialize(ref Guid requiredStringUuid, ref string? body);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid)
|
||||
protected virtual (Guid, string?) OnFakeOuterStringSerialize(Guid requiredStringUuid, string? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -961,8 +994,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredStringUuid == null)
|
||||
throw new ArgumentNullException(nameof(requiredStringUuid));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (requiredStringUuid, body);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1021,9 +1056,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid);
|
||||
|
||||
FormatFakeOuterStringSerialize(ref requiredStringUuid, ref body);
|
||||
var validatedParameterLocalVars = OnFakeOuterStringSerialize(requiredStringUuid, body);
|
||||
requiredStringUuid = validatedParameterLocalVars.Item1;
|
||||
body = validatedParameterLocalVars.Item2;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1089,6 +1124,15 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnGetArrayOfEnums()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -1137,6 +1181,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnGetArrayOfEnums();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -1182,14 +1228,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestBodyWithFileSchema(FileSchemaTestClass? fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass)
|
||||
protected virtual FileSchemaTestClass OnTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1197,8 +1241,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (fileSchemaTestClass == null)
|
||||
throw new ArgumentNullException(nameof(fileSchemaTestClass));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return fileSchemaTestClass;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1206,7 +1252,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
protected virtual void AfterTestBodyWithFileSchema(ApiResponse<object> apiResponseLocalVar, FileSchemaTestClass? fileSchemaTestClass)
|
||||
protected virtual void AfterTestBodyWithFileSchema(ApiResponse<object> apiResponseLocalVar, FileSchemaTestClass fileSchemaTestClass)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1217,7 +1263,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
protected virtual void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass? fileSchemaTestClass)
|
||||
protected virtual void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -1228,7 +1274,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass? fileSchemaTestClass = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1247,15 +1293,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestBodyWithFileSchemaAsync(FileSchemaTestClass? fileSchemaTestClass = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestBodyWithFileSchema(fileSchemaTestClass);
|
||||
|
||||
FormatTestBodyWithFileSchema(fileSchemaTestClass);
|
||||
fileSchemaTestClass = OnTestBodyWithFileSchema(fileSchemaTestClass);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1306,15 +1350,13 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestBodyWithQueryParams(User? user, ref string? query);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestBodyWithQueryParams(User user, string query)
|
||||
protected virtual (User, string) OnTestBodyWithQueryParams(User user, string query)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1325,8 +1367,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (query == null)
|
||||
throw new ArgumentNullException(nameof(query));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (user, query);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1335,7 +1379,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="query"></param>
|
||||
protected virtual void AfterTestBodyWithQueryParams(ApiResponse<object> apiResponseLocalVar, User? user, string? query)
|
||||
protected virtual void AfterTestBodyWithQueryParams(ApiResponse<object> apiResponseLocalVar, User user, string query)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1347,7 +1391,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="query"></param>
|
||||
protected virtual void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User? user, string? query)
|
||||
protected virtual void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User user, string query)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -1359,7 +1403,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestBodyWithQueryParamsOrDefaultAsync(User? user = null, string? query = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1379,15 +1423,15 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestBodyWithQueryParamsAsync(User? user = null, string? query = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestBodyWithQueryParams(user, query);
|
||||
|
||||
FormatTestBodyWithQueryParams(user, ref query);
|
||||
var validatedParameterLocalVars = OnTestBodyWithQueryParams(user, query);
|
||||
user = validatedParameterLocalVars.Item1;
|
||||
query = validatedParameterLocalVars.Item2;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1444,14 +1488,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestClientModel(ModelClient? modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="modelClient"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestClientModel(ModelClient modelClient)
|
||||
protected virtual ModelClient OnTestClientModel(ModelClient modelClient)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1459,8 +1501,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (modelClient == null)
|
||||
throw new ArgumentNullException(nameof(modelClient));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return modelClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1468,7 +1512,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void AfterTestClientModel(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient? modelClient)
|
||||
protected virtual void AfterTestClientModel(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient modelClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1479,7 +1523,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient? modelClient)
|
||||
protected virtual void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -1490,7 +1534,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient>?> TestClientModelOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>?> TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1509,15 +1553,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient>> TestClientModelAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>> TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestClientModel(modelClient);
|
||||
|
||||
FormatTestClientModel(modelClient);
|
||||
modelClient = OnTestClientModel(modelClient);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1577,8 +1619,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestEndpointParameters(ref byte[]? varByte, ref decimal number, ref double varDouble, ref string? patternWithoutDelimiter, ref DateTime? date, ref System.IO.Stream? binary, ref float? varFloat, ref int? integer, ref int? int32, ref long? int64, ref string? varString, ref string? password, ref string? callback, ref DateTime? dateTime);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1597,7 +1637,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter)
|
||||
protected virtual (byte[], decimal, double, string, DateTime?, System.IO.Stream?, float?, int?, int?, long?, string?, string?, string?, DateTime?) OnTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? varFloat, int? integer, int? int32, long? int64, string? varString, string? password, string? callback, DateTime? dateTime)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1614,8 +1654,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (patternWithoutDelimiter == null)
|
||||
throw new ArgumentNullException(nameof(patternWithoutDelimiter));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1636,7 +1678,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
protected virtual void AfterTestEndpointParameters(ApiResponse<object> apiResponseLocalVar, byte[]? varByte, decimal number, double varDouble, string? patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? varFloat, int? integer, int? int32, long? int64, string? varString, string? password, string? callback, DateTime? dateTime)
|
||||
protected virtual void AfterTestEndpointParameters(ApiResponse<object> apiResponseLocalVar, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? varFloat, int? integer, int? int32, long? int64, string? varString, string? password, string? callback, DateTime? dateTime)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1660,7 +1702,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
protected virtual void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[]? varByte, decimal number, double varDouble, string? patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? varFloat, int? integer, int? int32, long? int64, string? varString, string? password, string? callback, DateTime? dateTime)
|
||||
protected virtual void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? varFloat, int? integer, int? int32, long? int64, string? varString, string? password, string? callback, DateTime? dateTime)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -1684,7 +1726,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="dateTime">None (optional, default to "2010-02-01T10:20:10.111110+01:00")</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestEndpointParametersOrDefaultAsync(byte[]? varByte = null, decimal number, double varDouble, string? patternWithoutDelimiter = null, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestEndpointParametersOrDefaultAsync(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1716,15 +1758,27 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="dateTime">None (optional, default to "2010-02-01T10:20:10.111110+01:00")</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestEndpointParametersAsync(byte[]? varByte = null, decimal number, double varDouble, string? patternWithoutDelimiter = null, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestEndpointParametersAsync(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? varFloat = null, int? integer = null, int? int32 = null, long? int64 = null, string? varString = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter);
|
||||
|
||||
FormatTestEndpointParameters(ref varByte, ref number, ref varDouble, ref patternWithoutDelimiter, ref date, ref binary, ref varFloat, ref integer, ref int32, ref int64, ref varString, ref password, ref callback, ref dateTime);
|
||||
var validatedParameterLocalVars = OnTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
varByte = validatedParameterLocalVars.Item1;
|
||||
number = validatedParameterLocalVars.Item2;
|
||||
varDouble = validatedParameterLocalVars.Item3;
|
||||
patternWithoutDelimiter = validatedParameterLocalVars.Item4;
|
||||
date = validatedParameterLocalVars.Item5;
|
||||
binary = validatedParameterLocalVars.Item6;
|
||||
varFloat = validatedParameterLocalVars.Item7;
|
||||
integer = validatedParameterLocalVars.Item8;
|
||||
int32 = validatedParameterLocalVars.Item9;
|
||||
int64 = validatedParameterLocalVars.Item10;
|
||||
varString = validatedParameterLocalVars.Item11;
|
||||
password = validatedParameterLocalVars.Item12;
|
||||
callback = validatedParameterLocalVars.Item13;
|
||||
dateTime = validatedParameterLocalVars.Item14;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1835,7 +1889,22 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestEnumParameters(List<string>? enumHeaderStringArray, List<string>? enumQueryStringArray, ref double? enumQueryDouble, ref int? enumQueryInteger, List<string>? enumFormStringArray, ref string? enumHeaderString, ref string? enumQueryString, ref string? enumFormString);
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="enumHeaderStringArray"></param>
|
||||
/// <param name="enumQueryStringArray"></param>
|
||||
/// <param name="enumQueryDouble"></param>
|
||||
/// <param name="enumQueryInteger"></param>
|
||||
/// <param name="enumFormStringArray"></param>
|
||||
/// <param name="enumHeaderString"></param>
|
||||
/// <param name="enumQueryString"></param>
|
||||
/// <param name="enumFormString"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual (List<string>?, List<string>?, double?, int?, List<string>?, string?, string?, string?) OnTestEnumParameters(List<string>? enumHeaderStringArray, List<string>? enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List<string>? enumFormStringArray, string? enumHeaderString, string? enumQueryString, string? enumFormString)
|
||||
{
|
||||
return (enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@@ -1917,7 +1986,15 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
FormatTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, ref enumQueryDouble, ref enumQueryInteger, enumFormStringArray, ref enumHeaderString, ref enumQueryString, ref enumFormString);
|
||||
var validatedParameterLocalVars = OnTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
enumHeaderStringArray = validatedParameterLocalVars.Item1;
|
||||
enumQueryStringArray = validatedParameterLocalVars.Item2;
|
||||
enumQueryDouble = validatedParameterLocalVars.Item3;
|
||||
enumQueryInteger = validatedParameterLocalVars.Item4;
|
||||
enumFormStringArray = validatedParameterLocalVars.Item5;
|
||||
enumHeaderString = validatedParameterLocalVars.Item6;
|
||||
enumQueryString = validatedParameterLocalVars.Item7;
|
||||
enumFormString = validatedParameterLocalVars.Item8;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1997,8 +2074,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestGroupParameters(ref bool requiredBooleanGroup, ref int requiredStringGroup, ref long requiredInt64Group, ref bool? booleanGroup, ref int? stringGroup, ref long? int64Group);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -2009,7 +2084,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group)
|
||||
protected virtual (bool, int, long, bool?, int?, long?) OnTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -2023,8 +2098,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredInt64Group == null)
|
||||
throw new ArgumentNullException(nameof(requiredInt64Group));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2099,9 +2176,13 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group);
|
||||
|
||||
FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredStringGroup, ref requiredInt64Group, ref booleanGroup, ref stringGroup, ref int64Group);
|
||||
var validatedParameterLocalVars = OnTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
requiredBooleanGroup = validatedParameterLocalVars.Item1;
|
||||
requiredStringGroup = validatedParameterLocalVars.Item2;
|
||||
requiredInt64Group = validatedParameterLocalVars.Item3;
|
||||
booleanGroup = validatedParameterLocalVars.Item4;
|
||||
stringGroup = validatedParameterLocalVars.Item5;
|
||||
int64Group = validatedParameterLocalVars.Item6;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -2169,14 +2250,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestInlineAdditionalProperties(Dictionary<string, string>? requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requestBody"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestInlineAdditionalProperties(Dictionary<string, string> requestBody)
|
||||
protected virtual Dictionary<string, string> OnTestInlineAdditionalProperties(Dictionary<string, string> requestBody)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -2184,8 +2263,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (requestBody == null)
|
||||
throw new ArgumentNullException(nameof(requestBody));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2193,7 +2274,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
protected virtual void AfterTestInlineAdditionalProperties(ApiResponse<object> apiResponseLocalVar, Dictionary<string, string>? requestBody)
|
||||
protected virtual void AfterTestInlineAdditionalProperties(ApiResponse<object> apiResponseLocalVar, Dictionary<string, string> requestBody)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2204,7 +2285,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
protected virtual void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary<string, string>? requestBody)
|
||||
protected virtual void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary<string, string> requestBody)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -2215,7 +2296,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string>? requestBody = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2234,15 +2315,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestInlineAdditionalPropertiesAsync(Dictionary<string, string>? requestBody = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestInlineAdditionalPropertiesAsync(Dictionary<string, string> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestInlineAdditionalProperties(requestBody);
|
||||
|
||||
FormatTestInlineAdditionalProperties(requestBody);
|
||||
requestBody = OnTestInlineAdditionalProperties(requestBody);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -2293,15 +2372,13 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestJsonFormData(ref string? param, ref string? param2);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="param2"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestJsonFormData(string param, string param2)
|
||||
protected virtual (string, string) OnTestJsonFormData(string param, string param2)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -2312,8 +2389,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (param2 == null)
|
||||
throw new ArgumentNullException(nameof(param2));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (param, param2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2322,7 +2401,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="param2"></param>
|
||||
protected virtual void AfterTestJsonFormData(ApiResponse<object> apiResponseLocalVar, string? param, string? param2)
|
||||
protected virtual void AfterTestJsonFormData(ApiResponse<object> apiResponseLocalVar, string param, string param2)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2334,7 +2413,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <param name="param2"></param>
|
||||
protected virtual void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string? param, string? param2)
|
||||
protected virtual void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string param, string param2)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -2346,7 +2425,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="param2">field2</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestJsonFormDataOrDefaultAsync(string? param = null, string? param2 = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2366,15 +2445,15 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="param2">field2</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestJsonFormDataAsync(string? param = null, string? param2 = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestJsonFormData(param, param2);
|
||||
|
||||
FormatTestJsonFormData(ref param, ref param2);
|
||||
var validatedParameterLocalVars = OnTestJsonFormData(param, param2);
|
||||
param = validatedParameterLocalVars.Item1;
|
||||
param2 = validatedParameterLocalVars.Item2;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -2435,8 +2514,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestQueryParameterCollectionFormat(List<string>? pipe, List<string>? ioutil, List<string>? http, List<string>? url, List<string>? context);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -2446,7 +2523,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="url"></param>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestQueryParameterCollectionFormat(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context)
|
||||
protected virtual (List<string>, List<string>, List<string>, List<string>, List<string>) OnTestQueryParameterCollectionFormat(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -2466,8 +2543,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (context == null)
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (pipe, ioutil, http, url, context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2479,7 +2558,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="http"></param>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="context"></param>
|
||||
protected virtual void AfterTestQueryParameterCollectionFormat(ApiResponse<object> apiResponseLocalVar, List<string>? pipe, List<string>? ioutil, List<string>? http, List<string>? url, List<string>? context)
|
||||
protected virtual void AfterTestQueryParameterCollectionFormat(ApiResponse<object> apiResponseLocalVar, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2494,7 +2573,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="http"></param>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="context"></param>
|
||||
protected virtual void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List<string>? pipe, List<string>? ioutil, List<string>? http, List<string>? url, List<string>? context)
|
||||
protected virtual void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -2509,7 +2588,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="context"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> TestQueryParameterCollectionFormatOrDefaultAsync(List<string>? pipe = null, List<string>? ioutil = null, List<string>? http = null, List<string>? url = null, List<string>? context = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestQueryParameterCollectionFormatOrDefaultAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2532,15 +2611,18 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="context"></param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> TestQueryParameterCollectionFormatAsync(List<string>? pipe = null, List<string>? ioutil = null, List<string>? http = null, List<string>? url = null, List<string>? context = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestQueryParameterCollectionFormatAsync(List<string> pipe, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
|
||||
FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
var validatedParameterLocalVars = OnTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
pipe = validatedParameterLocalVars.Item1;
|
||||
ioutil = validatedParameterLocalVars.Item2;
|
||||
http = validatedParameterLocalVars.Item3;
|
||||
url = validatedParameterLocalVars.Item4;
|
||||
context = validatedParameterLocalVars.Item5;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<ModelClient>></returns>
|
||||
Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// To test class name in snake case
|
||||
@@ -50,7 +50,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>ModelClient>?></returns>
|
||||
Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,14 +128,12 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
partial void FormatTestClassname(ModelClient? modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="modelClient"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestClassname(ModelClient modelClient)
|
||||
protected virtual ModelClient OnTestClassname(ModelClient modelClient)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -143,8 +141,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (modelClient == null)
|
||||
throw new ArgumentNullException(nameof(modelClient));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return modelClient;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void AfterTestClassname(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient? modelClient)
|
||||
protected virtual void AfterTestClassname(ApiResponse<ModelClient> apiResponseLocalVar, ModelClient modelClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="modelClient"></param>
|
||||
protected virtual void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient? modelClient)
|
||||
protected virtual void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient modelClient)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -193,15 +193,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="modelClient">client model</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ModelClient"/></returns>
|
||||
public async Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestClassname(modelClient);
|
||||
|
||||
FormatTestClassname(modelClient);
|
||||
modelClient = OnTestClassname(modelClient);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> AddPetAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Add a new pet to the store
|
||||
@@ -50,7 +50,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> AddPetOrDefaultAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> AddPetOrDefaultAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a pet
|
||||
@@ -87,7 +87,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<List<Pet>>></returns>
|
||||
Task<ApiResponse<List<Pet>>> FindPetsByStatusAsync(List<string>? status = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>> FindPetsByStatusAsync(List<string> status, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by status
|
||||
@@ -98,7 +98,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>List<Pet>>?></returns>
|
||||
Task<ApiResponse<List<Pet>>?> FindPetsByStatusOrDefaultAsync(List<string>? status = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>?> FindPetsByStatusOrDefaultAsync(List<string> status, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by tags
|
||||
@@ -110,7 +110,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<List<Pet>>></returns>
|
||||
Task<ApiResponse<List<Pet>>> FindPetsByTagsAsync(List<string>? tags = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>> FindPetsByTagsAsync(List<string> tags, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Finds Pets by tags
|
||||
@@ -121,7 +121,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>List<Pet>>?></returns>
|
||||
Task<ApiResponse<List<Pet>>?> FindPetsByTagsOrDefaultAsync(List<string>? tags = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>?> FindPetsByTagsOrDefaultAsync(List<string> tags, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Find pet by ID
|
||||
@@ -156,7 +156,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> UpdatePetAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Update an existing pet
|
||||
@@ -167,7 +167,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> UpdatePetOrDefaultAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> UpdatePetOrDefaultAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updates a pet in the store with form data
|
||||
@@ -235,7 +235,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<ApiResponse>></returns>
|
||||
Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsync(System.IO.Stream? requiredFile = null, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// uploads an image (required)
|
||||
@@ -248,7 +248,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>ApiResponse>?></returns>
|
||||
Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream? requiredFile = null, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,14 +326,12 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
partial void FormatAddPet(Pet? pet);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="pet"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateAddPet(Pet pet)
|
||||
protected virtual Pet OnAddPet(Pet pet)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -341,8 +339,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (pet == null)
|
||||
throw new ArgumentNullException(nameof(pet));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return pet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -350,7 +350,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="pet"></param>
|
||||
protected virtual void AfterAddPet(ApiResponse<object> apiResponseLocalVar, Pet? pet)
|
||||
protected virtual void AfterAddPet(ApiResponse<object> apiResponseLocalVar, Pet pet)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
protected virtual void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet? pet)
|
||||
protected virtual void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -372,7 +372,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> AddPetOrDefaultAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> AddPetOrDefaultAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -391,15 +391,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> AddPetAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> AddPetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateAddPet(pet);
|
||||
|
||||
FormatAddPet(pet);
|
||||
pet = OnAddPet(pet);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -475,15 +473,13 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatDeletePet(ref long petId, ref string? apiKey);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateDeletePet(long petId)
|
||||
protected virtual (long, string?) OnDeletePet(long petId, string? apiKey)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -491,8 +487,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (petId, apiKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -551,9 +549,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateDeletePet(petId);
|
||||
|
||||
FormatDeletePet(ref petId, ref apiKey);
|
||||
var validatedParameterLocalVars = OnDeletePet(petId, apiKey);
|
||||
petId = validatedParameterLocalVars.Item1;
|
||||
apiKey = validatedParameterLocalVars.Item2;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -606,14 +604,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFindPetsByStatus(List<string>? status);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFindPetsByStatus(List<string> status)
|
||||
protected virtual List<string> OnFindPetsByStatus(List<string> status)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -621,8 +617,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (status == null)
|
||||
throw new ArgumentNullException(nameof(status));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -630,7 +628,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="status"></param>
|
||||
protected virtual void AfterFindPetsByStatus(ApiResponse<List<Pet>> apiResponseLocalVar, List<string>? status)
|
||||
protected virtual void AfterFindPetsByStatus(ApiResponse<List<Pet>> apiResponseLocalVar, List<string> status)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -641,7 +639,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="status"></param>
|
||||
protected virtual void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List<string>? status)
|
||||
protected virtual void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List<string> status)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -652,7 +650,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByStatusOrDefaultAsync(List<string>? status = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByStatusOrDefaultAsync(List<string> status, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -671,15 +669,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="status">Status values that need to be considered for filter</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByStatusAsync(List<string>? status = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByStatusAsync(List<string> status, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFindPetsByStatus(status);
|
||||
|
||||
FormatFindPetsByStatus(status);
|
||||
status = OnFindPetsByStatus(status);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -757,14 +753,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFindPetsByTags(List<string>? tags);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="tags"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFindPetsByTags(List<string> tags)
|
||||
protected virtual List<string> OnFindPetsByTags(List<string> tags)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -772,8 +766,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (tags == null)
|
||||
throw new ArgumentNullException(nameof(tags));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -781,7 +777,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="tags"></param>
|
||||
protected virtual void AfterFindPetsByTags(ApiResponse<List<Pet>> apiResponseLocalVar, List<string>? tags)
|
||||
protected virtual void AfterFindPetsByTags(ApiResponse<List<Pet>> apiResponseLocalVar, List<string> tags)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -792,7 +788,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="tags"></param>
|
||||
protected virtual void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List<string>? tags)
|
||||
protected virtual void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List<string> tags)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -803,7 +799,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByTagsOrDefaultAsync(List<string>? tags = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByTagsOrDefaultAsync(List<string> tags, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -822,15 +818,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="tags">Tags to filter by</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="List<Pet>"/></returns>
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByTagsAsync(List<string>? tags = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByTagsAsync(List<string> tags, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFindPetsByTags(tags);
|
||||
|
||||
FormatFindPetsByTags(tags);
|
||||
tags = OnFindPetsByTags(tags);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -908,14 +902,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetPetById(ref long petId);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateGetPetById(long petId)
|
||||
protected virtual long OnGetPetById(long petId)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -923,8 +915,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return petId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -979,9 +973,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateGetPetById(petId);
|
||||
|
||||
FormatGetPetById(ref petId);
|
||||
petId = OnGetPetById(petId);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1039,14 +1031,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUpdatePet(Pet? pet);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="pet"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUpdatePet(Pet pet)
|
||||
protected virtual Pet OnUpdatePet(Pet pet)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1054,8 +1044,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (pet == null)
|
||||
throw new ArgumentNullException(nameof(pet));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return pet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1063,7 +1055,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="pet"></param>
|
||||
protected virtual void AfterUpdatePet(ApiResponse<object> apiResponseLocalVar, Pet? pet)
|
||||
protected virtual void AfterUpdatePet(ApiResponse<object> apiResponseLocalVar, Pet pet)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1074,7 +1066,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="pet"></param>
|
||||
protected virtual void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet? pet)
|
||||
protected virtual void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet pet)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -1085,7 +1077,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> UpdatePetOrDefaultAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> UpdatePetOrDefaultAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1104,15 +1096,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pet">Pet object that needs to be added to the store</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> UpdatePetAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> UpdatePetAsync(Pet pet, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUpdatePet(pet);
|
||||
|
||||
FormatUpdatePet(pet);
|
||||
pet = OnUpdatePet(pet);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1188,8 +1178,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUpdatePetWithForm(ref long petId, ref string? name, ref string? status);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1197,7 +1185,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUpdatePetWithForm(long petId)
|
||||
protected virtual (long, string?, string?) OnUpdatePetWithForm(long petId, string? name, string? status)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1205,8 +1193,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (petId, name, status);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1269,9 +1259,10 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUpdatePetWithForm(petId);
|
||||
|
||||
FormatUpdatePetWithForm(ref petId, ref name, ref status);
|
||||
var validatedParameterLocalVars = OnUpdatePetWithForm(petId, name, status);
|
||||
petId = validatedParameterLocalVars.Item1;
|
||||
name = validatedParameterLocalVars.Item2;
|
||||
status = validatedParameterLocalVars.Item3;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1342,8 +1333,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUploadFile(ref long petId, ref System.IO.Stream? file, ref string? additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1351,7 +1340,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFile(long petId)
|
||||
protected virtual (long, System.IO.Stream?, string?) OnUploadFile(long petId, System.IO.Stream? file, string? additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1359,8 +1348,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (petId, file, additionalMetadata);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1423,9 +1414,10 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFile(petId);
|
||||
|
||||
FormatUploadFile(ref petId, ref file, ref additionalMetadata);
|
||||
var validatedParameterLocalVars = OnUploadFile(petId, file, additionalMetadata);
|
||||
petId = validatedParameterLocalVars.Item1;
|
||||
file = validatedParameterLocalVars.Item2;
|
||||
additionalMetadata = validatedParameterLocalVars.Item3;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1505,8 +1497,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUploadFileWithRequiredFile(ref System.IO.Stream? requiredFile, ref long petId, ref string? additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1514,7 +1504,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId)
|
||||
protected virtual (System.IO.Stream, long, string?) OnUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string? additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1525,8 +1515,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (requiredFile, petId, additionalMetadata);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1536,7 +1528,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
protected virtual void AfterUploadFileWithRequiredFile(ApiResponse<ApiResponse> apiResponseLocalVar, System.IO.Stream? requiredFile, long petId, string? additionalMetadata)
|
||||
protected virtual void AfterUploadFileWithRequiredFile(ApiResponse<ApiResponse> apiResponseLocalVar, System.IO.Stream requiredFile, long petId, string? additionalMetadata)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1549,7 +1541,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
protected virtual void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream? requiredFile, long petId, string? additionalMetadata)
|
||||
protected virtual void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, string? additionalMetadata)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -1562,7 +1554,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ApiResponse"/></returns>
|
||||
public async Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream? requiredFile = null, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1583,15 +1575,16 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="ApiResponse"/></returns>
|
||||
public async Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsync(System.IO.Stream? requiredFile = null, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId);
|
||||
|
||||
FormatUploadFileWithRequiredFile(ref requiredFile, ref petId, ref additionalMetadata);
|
||||
var validatedParameterLocalVars = OnUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata);
|
||||
requiredFile = validatedParameterLocalVars.Item1;
|
||||
petId = validatedParameterLocalVars.Item2;
|
||||
additionalMetadata = validatedParameterLocalVars.Item3;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> DeleteOrderAsync(string? orderId = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Delete purchase order by ID
|
||||
@@ -50,7 +50,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> DeleteOrderOrDefaultAsync(string? orderId = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status
|
||||
@@ -106,7 +106,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<Order>></returns>
|
||||
Task<ApiResponse<Order>> PlaceOrderAsync(Order? order = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<Order>> PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@@ -117,7 +117,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>Order>?></returns>
|
||||
Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order? order = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,14 +195,12 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
partial void FormatDeleteOrder(ref string? orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateDeleteOrder(string orderId)
|
||||
protected virtual string OnDeleteOrder(string orderId)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -210,8 +208,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (orderId == null)
|
||||
throw new ArgumentNullException(nameof(orderId));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return orderId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -219,7 +219,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="orderId"></param>
|
||||
protected virtual void AfterDeleteOrder(ApiResponse<object> apiResponseLocalVar, string? orderId)
|
||||
protected virtual void AfterDeleteOrder(ApiResponse<object> apiResponseLocalVar, string orderId)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="orderId"></param>
|
||||
protected virtual void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string? orderId)
|
||||
protected virtual void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string orderId)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -241,7 +241,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> DeleteOrderOrDefaultAsync(string? orderId = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -260,15 +260,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="orderId">ID of the order that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> DeleteOrderAsync(string? orderId = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> DeleteOrderAsync(string orderId, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateDeleteOrder(orderId);
|
||||
|
||||
FormatDeleteOrder(ref orderId);
|
||||
orderId = OnDeleteOrder(orderId);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -306,6 +304,15 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnGetInventory()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -354,6 +361,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnGetInventory();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -409,14 +418,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetOrderById(ref long orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateGetOrderById(long orderId)
|
||||
protected virtual long OnGetOrderById(long orderId)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -424,8 +431,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (orderId == null)
|
||||
throw new ArgumentNullException(nameof(orderId));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return orderId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -480,9 +489,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateGetOrderById(orderId);
|
||||
|
||||
FormatGetOrderById(ref orderId);
|
||||
orderId = OnGetOrderById(orderId);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -530,14 +537,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatPlaceOrder(Order? order);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="order"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidatePlaceOrder(Order order)
|
||||
protected virtual Order OnPlaceOrder(Order order)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -545,8 +550,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (order == null)
|
||||
throw new ArgumentNullException(nameof(order));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return order;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -554,7 +561,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="order"></param>
|
||||
protected virtual void AfterPlaceOrder(ApiResponse<Order> apiResponseLocalVar, Order? order)
|
||||
protected virtual void AfterPlaceOrder(ApiResponse<Order> apiResponseLocalVar, Order order)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -565,7 +572,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="order"></param>
|
||||
protected virtual void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order? order)
|
||||
protected virtual void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order order)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -576,7 +583,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Order"/></returns>
|
||||
public async Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order? order = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -595,15 +602,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="order">order placed for purchasing the pet</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="Order"/></returns>
|
||||
public async Task<ApiResponse<Order>> PlaceOrderAsync(Order? order = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<Order>> PlaceOrderAsync(Order order, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidatePlaceOrder(order);
|
||||
|
||||
FormatPlaceOrder(order);
|
||||
order = OnPlaceOrder(order);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> CreateUserAsync(User? user = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Create user
|
||||
@@ -50,7 +50,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> CreateUserOrDefaultAsync(User? user = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -62,7 +62,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -73,7 +73,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> CreateUsersWithArrayInputOrDefaultAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> CreateUsersWithArrayInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -85,7 +85,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Creates list of users with given input array
|
||||
@@ -96,7 +96,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> CreateUsersWithListInputOrDefaultAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> CreateUsersWithListInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
@@ -108,7 +108,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> DeleteUserAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Delete user
|
||||
@@ -119,7 +119,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> DeleteUserOrDefaultAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
@@ -131,7 +131,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<User>></returns>
|
||||
Task<ApiResponse<User>> GetUserByNameAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<User>> GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
@@ -142,7 +142,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>User>?></returns>
|
||||
Task<ApiResponse<User>?> GetUserByNameOrDefaultAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<User>?> GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@@ -155,7 +155,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<string>></returns>
|
||||
Task<ApiResponse<string>> LoginUserAsync(string? username = null, string? password = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<string>> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs user into the system
|
||||
@@ -167,7 +167,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>string>?></returns>
|
||||
Task<ApiResponse<string>?> LoginUserOrDefaultAsync(string? username = null, string? password = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<string>?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Logs out current logged in user session
|
||||
@@ -201,7 +201,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<object>></returns>
|
||||
Task<ApiResponse<object>> UpdateUserAsync(User? user = null, string? username = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Updated user
|
||||
@@ -213,7 +213,7 @@ namespace Org.OpenAPITools.IApi
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse>object>?></returns>
|
||||
Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User? user = null, string? username = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,14 +291,12 @@ namespace Org.OpenAPITools.Api
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
|
||||
}
|
||||
|
||||
partial void FormatCreateUser(User? user);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateCreateUser(User user)
|
||||
protected virtual User OnCreateUser(User user)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -306,8 +304,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -315,7 +315,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void AfterCreateUser(ApiResponse<object> apiResponseLocalVar, User? user)
|
||||
protected virtual void AfterCreateUser(ApiResponse<object> apiResponseLocalVar, User user)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void OnErrorCreateUser(Exception exception, string pathFormat, string path, User? user)
|
||||
protected virtual void OnErrorCreateUser(Exception exception, string pathFormat, string path, User user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -337,7 +337,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> CreateUserOrDefaultAsync(User? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -356,15 +356,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">Created user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> CreateUserAsync(User? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateCreateUser(user);
|
||||
|
||||
FormatCreateUser(user);
|
||||
user = OnCreateUser(user);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -415,14 +413,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatCreateUsersWithArrayInput(List<User>? user);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateCreateUsersWithArrayInput(List<User> user)
|
||||
protected virtual List<User> OnCreateUsersWithArrayInput(List<User> user)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -430,8 +426,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -439,7 +437,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void AfterCreateUsersWithArrayInput(ApiResponse<object> apiResponseLocalVar, List<User>? user)
|
||||
protected virtual void AfterCreateUsersWithArrayInput(ApiResponse<object> apiResponseLocalVar, List<User> user)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -450,7 +448,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List<User>? user)
|
||||
protected virtual void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -461,7 +459,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> CreateUsersWithArrayInputOrDefaultAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> CreateUsersWithArrayInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -480,15 +478,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateCreateUsersWithArrayInput(user);
|
||||
|
||||
FormatCreateUsersWithArrayInput(user);
|
||||
user = OnCreateUsersWithArrayInput(user);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -539,14 +535,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatCreateUsersWithListInput(List<User>? user);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateCreateUsersWithListInput(List<User> user)
|
||||
protected virtual List<User> OnCreateUsersWithListInput(List<User> user)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -554,8 +548,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -563,7 +559,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void AfterCreateUsersWithListInput(ApiResponse<object> apiResponseLocalVar, List<User>? user)
|
||||
protected virtual void AfterCreateUsersWithListInput(ApiResponse<object> apiResponseLocalVar, List<User> user)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -574,7 +570,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
protected virtual void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List<User>? user)
|
||||
protected virtual void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List<User> user)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -585,7 +581,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> CreateUsersWithListInputOrDefaultAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> CreateUsersWithListInputOrDefaultAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -604,15 +600,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="user">List of user object</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User> user, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateCreateUsersWithListInput(user);
|
||||
|
||||
FormatCreateUsersWithListInput(user);
|
||||
user = OnCreateUsersWithListInput(user);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -663,14 +657,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatDeleteUser(ref string? username);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateDeleteUser(string username)
|
||||
protected virtual string OnDeleteUser(string username)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -678,8 +670,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (username == null)
|
||||
throw new ArgumentNullException(nameof(username));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return username;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -687,7 +681,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void AfterDeleteUser(ApiResponse<object> apiResponseLocalVar, string? username)
|
||||
protected virtual void AfterDeleteUser(ApiResponse<object> apiResponseLocalVar, string username)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -698,7 +692,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string? username)
|
||||
protected virtual void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -709,7 +703,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> DeleteUserOrDefaultAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -728,15 +722,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">The name that needs to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> DeleteUserAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> DeleteUserAsync(string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateDeleteUser(username);
|
||||
|
||||
FormatDeleteUser(ref username);
|
||||
username = OnDeleteUser(username);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -774,14 +766,12 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetUserByName(ref string? username);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateGetUserByName(string username)
|
||||
protected virtual string OnGetUserByName(string username)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -789,8 +779,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (username == null)
|
||||
throw new ArgumentNullException(nameof(username));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return username;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -798,7 +790,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void AfterGetUserByName(ApiResponse<User> apiResponseLocalVar, string? username)
|
||||
protected virtual void AfterGetUserByName(ApiResponse<User> apiResponseLocalVar, string username)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -809,7 +801,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string? username)
|
||||
protected virtual void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -820,7 +812,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="User"/></returns>
|
||||
public async Task<ApiResponse<User>?> GetUserByNameOrDefaultAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<User>?> GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -839,15 +831,13 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="User"/></returns>
|
||||
public async Task<ApiResponse<User>> GetUserByNameAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<User>> GetUserByNameAsync(string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateGetUserByName(username);
|
||||
|
||||
FormatGetUserByName(ref username);
|
||||
username = OnGetUserByName(username);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -895,15 +885,13 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatLoginUser(ref string? username, ref string? password);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateLoginUser(string username, string password)
|
||||
protected virtual (string, string) OnLoginUser(string username, string password)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -914,8 +902,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (password == null)
|
||||
throw new ArgumentNullException(nameof(password));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (username, password);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -924,7 +914,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
protected virtual void AfterLoginUser(ApiResponse<string> apiResponseLocalVar, string? username, string? password)
|
||||
protected virtual void AfterLoginUser(ApiResponse<string> apiResponseLocalVar, string username, string password)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -936,7 +926,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
protected virtual void OnErrorLoginUser(Exception exception, string pathFormat, string path, string? username, string? password)
|
||||
protected virtual void OnErrorLoginUser(Exception exception, string pathFormat, string path, string username, string password)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -948,7 +938,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="string"/></returns>
|
||||
public async Task<ApiResponse<string>?> LoginUserOrDefaultAsync(string? username = null, string? password = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<string>?> LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -968,15 +958,15 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="password">The password for login in clear text</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="string"/></returns>
|
||||
public async Task<ApiResponse<string>> LoginUserAsync(string? username = null, string? password = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<string>> LoginUserAsync(string username, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateLoginUser(username, password);
|
||||
|
||||
FormatLoginUser(ref username, ref password);
|
||||
var validatedParameterLocalVars = OnLoginUser(username, password);
|
||||
username = validatedParameterLocalVars.Item1;
|
||||
password = validatedParameterLocalVars.Item2;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1031,6 +1021,15 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnLogoutUser()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -1079,6 +1078,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnLogoutUser();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -1115,15 +1116,13 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUpdateUser(User? user, ref string? username);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUpdateUser(User user, string username)
|
||||
protected virtual (User, string) OnUpdateUser(User user, string username)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@@ -1134,8 +1133,10 @@ namespace Org.OpenAPITools.Api
|
||||
if (username == null)
|
||||
throw new ArgumentNullException(nameof(username));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
return (user, username);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1144,7 +1145,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void AfterUpdateUser(ApiResponse<object> apiResponseLocalVar, User? user, string? username)
|
||||
protected virtual void AfterUpdateUser(ApiResponse<object> apiResponseLocalVar, User user, string username)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1156,7 +1157,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="path"></param>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="username"></param>
|
||||
protected virtual void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User? user, string? username)
|
||||
protected virtual void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User user, string username)
|
||||
{
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
@@ -1168,7 +1169,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User? user = null, string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1188,15 +1189,15 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="username">name that need to be deleted</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="object"/></returns>
|
||||
public async Task<ApiResponse<object>> UpdateUserAsync(User? user = null, string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> UpdateUserAsync(User user, string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUpdateUser(user, username);
|
||||
|
||||
FormatUpdateUser(user, ref username);
|
||||
var validatedParameterLocalVars = OnUpdateUser(user, username);
|
||||
user = validatedParameterLocalVars.Item1;
|
||||
username = validatedParameterLocalVars.Item2;
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="activityOutputs">activityOutputs</param>
|
||||
[JsonConstructor]
|
||||
public Activity(Dictionary<string, List<ActivityOutputElementRepresentation>>? activityOutputs = default)
|
||||
public Activity(Dictionary<string, List<ActivityOutputElementRepresentation>> activityOutputs)
|
||||
{
|
||||
ActivityOutputs = activityOutputs;
|
||||
OnCreated();
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ActivityOutputs
|
||||
/// </summary>
|
||||
[JsonPropertyName("activity_outputs")]
|
||||
public Dictionary<string, List<ActivityOutputElementRepresentation>>? ActivityOutputs { get; set; }
|
||||
public Dictionary<string, List<ActivityOutputElementRepresentation>> ActivityOutputs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="prop1">prop1</param>
|
||||
/// <param name="prop2">prop2</param>
|
||||
[JsonConstructor]
|
||||
public ActivityOutputElementRepresentation(string? prop1 = default, Object? prop2 = default)
|
||||
public ActivityOutputElementRepresentation(string prop1, Object prop2)
|
||||
{
|
||||
Prop1 = prop1;
|
||||
Prop2 = prop2;
|
||||
@@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Prop1
|
||||
/// </summary>
|
||||
[JsonPropertyName("prop1")]
|
||||
public string? Prop1 { get; set; }
|
||||
public string Prop1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Prop2
|
||||
/// </summary>
|
||||
[JsonPropertyName("prop2")]
|
||||
public Object? Prop2 { get; set; }
|
||||
public Object Prop2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapWithUndeclaredPropertiesString">mapWithUndeclaredPropertiesString</param>
|
||||
/// <param name="anytype1">anytype1</param>
|
||||
[JsonConstructor]
|
||||
public AdditionalPropertiesClass(Object? emptyMap = default, Dictionary<string, Dictionary<string, string>>? mapOfMapProperty = default, Dictionary<string, string>? mapProperty = default, Object? mapWithUndeclaredPropertiesAnytype1 = default, Object? mapWithUndeclaredPropertiesAnytype2 = default, Dictionary<string, Object>? mapWithUndeclaredPropertiesAnytype3 = default, Dictionary<string, string>? mapWithUndeclaredPropertiesString = default, Object? anytype1 = default)
|
||||
public AdditionalPropertiesClass(Object emptyMap, Dictionary<string, Dictionary<string, string>> mapOfMapProperty, Dictionary<string, string> mapProperty, Object mapWithUndeclaredPropertiesAnytype1, Object mapWithUndeclaredPropertiesAnytype2, Dictionary<string, Object> mapWithUndeclaredPropertiesAnytype3, Dictionary<string, string> mapWithUndeclaredPropertiesString, Object? anytype1 = default)
|
||||
{
|
||||
EmptyMap = emptyMap;
|
||||
MapOfMapProperty = mapOfMapProperty;
|
||||
@@ -62,43 +62,43 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <value>an object with no declared properties and no undeclared properties, hence it's an empty map.</value>
|
||||
[JsonPropertyName("empty_map")]
|
||||
public Object? EmptyMap { get; set; }
|
||||
public Object EmptyMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapOfMapProperty
|
||||
/// </summary>
|
||||
[JsonPropertyName("map_of_map_property")]
|
||||
public Dictionary<string, Dictionary<string, string>>? MapOfMapProperty { get; set; }
|
||||
public Dictionary<string, Dictionary<string, string>> MapOfMapProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapProperty
|
||||
/// </summary>
|
||||
[JsonPropertyName("map_property")]
|
||||
public Dictionary<string, string>? MapProperty { get; set; }
|
||||
public Dictionary<string, string> MapProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype1
|
||||
/// </summary>
|
||||
[JsonPropertyName("map_with_undeclared_properties_anytype_1")]
|
||||
public Object? MapWithUndeclaredPropertiesAnytype1 { get; set; }
|
||||
public Object MapWithUndeclaredPropertiesAnytype1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype2
|
||||
/// </summary>
|
||||
[JsonPropertyName("map_with_undeclared_properties_anytype_2")]
|
||||
public Object? MapWithUndeclaredPropertiesAnytype2 { get; set; }
|
||||
public Object MapWithUndeclaredPropertiesAnytype2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesAnytype3
|
||||
/// </summary>
|
||||
[JsonPropertyName("map_with_undeclared_properties_anytype_3")]
|
||||
public Dictionary<string, Object>? MapWithUndeclaredPropertiesAnytype3 { get; set; }
|
||||
public Dictionary<string, Object> MapWithUndeclaredPropertiesAnytype3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapWithUndeclaredPropertiesString
|
||||
/// </summary>
|
||||
[JsonPropertyName("map_with_undeclared_properties_string")]
|
||||
public Dictionary<string, string>? MapWithUndeclaredPropertiesString { get; set; }
|
||||
public Dictionary<string, string> MapWithUndeclaredPropertiesString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Anytype1
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="className">className</param>
|
||||
/// <param name="color">color (default to "red")</param>
|
||||
[JsonConstructor]
|
||||
public Animal(string? className = default, string? color = @"red")
|
||||
public Animal(string className, string color = @"red")
|
||||
{
|
||||
ClassName = className;
|
||||
Color = color;
|
||||
@@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ClassName
|
||||
/// </summary>
|
||||
[JsonPropertyName("className")]
|
||||
public string? ClassName { get; set; }
|
||||
public string ClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Color
|
||||
/// </summary>
|
||||
[JsonPropertyName("color")]
|
||||
public string? Color { get; set; }
|
||||
public string Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="message">message</param>
|
||||
/// <param name="type">type</param>
|
||||
[JsonConstructor]
|
||||
public ApiResponse(int code, string? message = default, string? type = default)
|
||||
public ApiResponse(int code, string message, string type)
|
||||
{
|
||||
Code = code;
|
||||
Message = message;
|
||||
@@ -57,13 +57,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Message
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string? Message { get; set; }
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public string? Type { get; set; }
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="cultivar">cultivar</param>
|
||||
/// <param name="origin">origin</param>
|
||||
[JsonConstructor]
|
||||
public Apple(string? cultivar = default, string? origin = default)
|
||||
public Apple(string cultivar, string origin)
|
||||
{
|
||||
Cultivar = cultivar;
|
||||
Origin = origin;
|
||||
@@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Cultivar
|
||||
/// </summary>
|
||||
[JsonPropertyName("cultivar")]
|
||||
public string? Cultivar { get; set; }
|
||||
public string Cultivar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Origin
|
||||
/// </summary>
|
||||
[JsonPropertyName("origin")]
|
||||
public string? Origin { get; set; }
|
||||
public string Origin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="cultivar">cultivar</param>
|
||||
/// <param name="mealy">mealy</param>
|
||||
[JsonConstructor]
|
||||
public AppleReq(string? cultivar = default, bool mealy)
|
||||
public AppleReq(string cultivar, bool mealy)
|
||||
{
|
||||
Cultivar = cultivar;
|
||||
Mealy = mealy;
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Cultivar
|
||||
/// </summary>
|
||||
[JsonPropertyName("cultivar")]
|
||||
public string? Cultivar { get; set; }
|
||||
public string Cultivar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Mealy
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="arrayArrayNumber">arrayArrayNumber</param>
|
||||
[JsonConstructor]
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>>? arrayArrayNumber = default)
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>> arrayArrayNumber)
|
||||
{
|
||||
ArrayArrayNumber = arrayArrayNumber;
|
||||
OnCreated();
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayArrayNumber
|
||||
/// </summary>
|
||||
[JsonPropertyName("ArrayArrayNumber")]
|
||||
public List<List<decimal>>? ArrayArrayNumber { get; set; }
|
||||
public List<List<decimal>> ArrayArrayNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="arrayNumber">arrayNumber</param>
|
||||
[JsonConstructor]
|
||||
public ArrayOfNumberOnly(List<decimal>? arrayNumber = default)
|
||||
public ArrayOfNumberOnly(List<decimal> arrayNumber)
|
||||
{
|
||||
ArrayNumber = arrayNumber;
|
||||
OnCreated();
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayNumber
|
||||
/// </summary>
|
||||
[JsonPropertyName("ArrayNumber")]
|
||||
public List<decimal>? ArrayNumber { get; set; }
|
||||
public List<decimal> ArrayNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="arrayArrayOfModel">arrayArrayOfModel</param>
|
||||
/// <param name="arrayOfString">arrayOfString</param>
|
||||
[JsonConstructor]
|
||||
public ArrayTest(List<List<long>>? arrayArrayOfInteger = default, List<List<ReadOnlyFirst>>? arrayArrayOfModel = default, List<string>? arrayOfString = default)
|
||||
public ArrayTest(List<List<long>> arrayArrayOfInteger, List<List<ReadOnlyFirst>> arrayArrayOfModel, List<string> arrayOfString)
|
||||
{
|
||||
ArrayArrayOfInteger = arrayArrayOfInteger;
|
||||
ArrayArrayOfModel = arrayArrayOfModel;
|
||||
@@ -51,19 +51,19 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ArrayArrayOfInteger
|
||||
/// </summary>
|
||||
[JsonPropertyName("array_array_of_integer")]
|
||||
public List<List<long>>? ArrayArrayOfInteger { get; set; }
|
||||
public List<List<long>> ArrayArrayOfInteger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfModel
|
||||
/// </summary>
|
||||
[JsonPropertyName("array_array_of_model")]
|
||||
public List<List<ReadOnlyFirst>>? ArrayArrayOfModel { get; set; }
|
||||
public List<List<ReadOnlyFirst>> ArrayArrayOfModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayOfString
|
||||
/// </summary>
|
||||
[JsonPropertyName("array_of_string")]
|
||||
public List<string>? ArrayOfString { get; set; }
|
||||
public List<string> ArrayOfString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="className">className</param>
|
||||
[JsonConstructor]
|
||||
public BasquePig(string? className = default)
|
||||
public BasquePig(string className)
|
||||
{
|
||||
ClassName = className;
|
||||
OnCreated();
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets ClassName
|
||||
/// </summary>
|
||||
[JsonPropertyName("className")]
|
||||
public string? ClassName { get; set; }
|
||||
public string ClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="smallCamel">smallCamel</param>
|
||||
/// <param name="smallSnake">smallSnake</param>
|
||||
[JsonConstructor]
|
||||
public Capitalization(string? aTTNAME = default, string? capitalCamel = default, string? capitalSnake = default, string? sCAETHFlowPoints = default, string? smallCamel = default, string? smallSnake = default)
|
||||
public Capitalization(string aTTNAME, string capitalCamel, string capitalSnake, string sCAETHFlowPoints, string smallCamel, string smallSnake)
|
||||
{
|
||||
ATT_NAME = aTTNAME;
|
||||
CapitalCamel = capitalCamel;
|
||||
@@ -58,37 +58,37 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <value>Name of the pet </value>
|
||||
[JsonPropertyName("ATT_NAME")]
|
||||
public string? ATT_NAME { get; set; }
|
||||
public string ATT_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets CapitalCamel
|
||||
/// </summary>
|
||||
[JsonPropertyName("CapitalCamel")]
|
||||
public string? CapitalCamel { get; set; }
|
||||
public string CapitalCamel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets CapitalSnake
|
||||
/// </summary>
|
||||
[JsonPropertyName("Capital_Snake")]
|
||||
public string? CapitalSnake { get; set; }
|
||||
public string CapitalSnake { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SCAETHFlowPoints
|
||||
/// </summary>
|
||||
[JsonPropertyName("SCA_ETH_Flow_Points")]
|
||||
public string? SCAETHFlowPoints { get; set; }
|
||||
public string SCAETHFlowPoints { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SmallCamel
|
||||
/// </summary>
|
||||
[JsonPropertyName("smallCamel")]
|
||||
public string? SmallCamel { get; set; }
|
||||
public string SmallCamel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets SmallSnake
|
||||
/// </summary>
|
||||
[JsonPropertyName("small_Snake")]
|
||||
public string? SmallSnake { get; set; }
|
||||
public string SmallSnake { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="className">className</param>
|
||||
/// <param name="color">color (default to "red")</param>
|
||||
[JsonConstructor]
|
||||
internal Cat(Dictionary<string, int> dictionary, CatAllOf catAllOf, string? className = default, string? color = @"red") : base(className, color)
|
||||
internal Cat(Dictionary<string, int> dictionary, CatAllOf catAllOf, string className, string color = @"red") : base(className, color)
|
||||
{
|
||||
Dictionary = dictionary;
|
||||
CatAllOf = catAllOf;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="id">id</param>
|
||||
/// <param name="name">name (default to "default-name")</param>
|
||||
[JsonConstructor]
|
||||
public Category(long id, string? name = @"default-name")
|
||||
public Category(long id, string name = @"default-name")
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
@@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="childCatAllOf"></param>
|
||||
/// <param name="petType">petType</param>
|
||||
[JsonConstructor]
|
||||
internal ChildCat(ChildCatAllOf childCatAllOf, string? petType = default) : base(petType)
|
||||
internal ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType)
|
||||
{
|
||||
ChildCatAllOf = childCatAllOf;
|
||||
OnCreated();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="name">name</param>
|
||||
/// <param name="petType">petType (default to PetTypeEnum.ChildCat)</param>
|
||||
[JsonConstructor]
|
||||
public ChildCatAllOf(string? name = default, PetTypeEnum petType = PetTypeEnum.ChildCat)
|
||||
public ChildCatAllOf(string name, PetTypeEnum petType = PetTypeEnum.ChildCat)
|
||||
{
|
||||
Name = name;
|
||||
PetType = petType;
|
||||
@@ -93,7 +93,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// </summary>
|
||||
/// <param name="varClass">varClass</param>
|
||||
[JsonConstructor]
|
||||
public ClassModel(string? varClass = default)
|
||||
public ClassModel(string varClass)
|
||||
{
|
||||
VarClass = varClass;
|
||||
OnCreated();
|
||||
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets VarClass
|
||||
/// </summary>
|
||||
[JsonPropertyName("_class")]
|
||||
public string? VarClass { get; set; }
|
||||
public string VarClass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user