forked from loafle/openapi-generator-original
Compare commits
14 Commits
go-server-
...
features/f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdae6aaf81 | ||
|
|
7dfd844f13 | ||
|
|
8efcc2c62d | ||
|
|
9f7b0ba849 | ||
|
|
d157245efa | ||
|
|
1561c33966 | ||
|
|
ff414dd6da | ||
|
|
0bcf9d8bde | ||
|
|
1e1e786a72 | ||
|
|
d7d57e2ea3 | ||
|
|
10c270fda6 | ||
|
|
1d5b1b0a8f | ||
|
|
8a0f374a45 | ||
|
|
8bad27e0ab |
@@ -19,7 +19,7 @@ jobs:
|
||||
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v3.1.0
|
||||
- uses: actions/setup-dotnet@v3.2.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.1.0
|
||||
- uses: actions/setup-dotnet@v3.2.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.1.0
|
||||
- uses: actions/setup-dotnet@v3.2.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.1.0
|
||||
- uses: actions/setup-dotnet@v3.2.0
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -8,4 +8,11 @@ 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,3 +9,10 @@ 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,7 +2736,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
addProperties(allProperties, allRequired, refSchema, new HashSet<>());
|
||||
} else {
|
||||
// composition
|
||||
addProperties(properties, required, refSchema, new HashSet<>());
|
||||
Map<String, Schema> newProperties = new LinkedHashMap<>();
|
||||
addProperties(newProperties, required, refSchema, new HashSet<>());
|
||||
mergeProperties(properties, newProperties);
|
||||
addProperties(allProperties, allRequired, refSchema, new HashSet<>());
|
||||
}
|
||||
}
|
||||
@@ -2812,6 +2814,28 @@ 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,10 +519,13 @@ 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);
|
||||
|
||||
// TODO: move the logic of these three methods into patchProperty so all CodegenProperty instances get the same treatment
|
||||
postProcessEnumRefs(processed);
|
||||
updateValueTypeProperty(processed);
|
||||
updateNullableTypeProperty(processed);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, ModelsMap> entry : objs.entrySet()) {
|
||||
CodegenModel model = ModelUtils.getModelByName(entry.getKey(), objs);
|
||||
@@ -532,34 +535,54 @@ 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(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.vars) {
|
||||
patchProperty(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.readWriteVars) {
|
||||
patchProperty(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.optionalVars) {
|
||||
patchProperty(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.parentVars) {
|
||||
patchProperty(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.requiredVars) {
|
||||
patchProperty(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.readOnlyVars) {
|
||||
patchProperty(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
for (CodegenProperty property : model.nonNullableVars) {
|
||||
patchProperty(model, property);
|
||||
patchProperty(enumRefs, model, property);
|
||||
}
|
||||
}
|
||||
return processed;
|
||||
}
|
||||
|
||||
private void patchProperty(CodegenModel model, CodegenProperty property) {
|
||||
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));
|
||||
|
||||
String tmpPropertyName = escapeReservedWord(model, property.name);
|
||||
if (property.name != tmpPropertyName) {
|
||||
// the casing will be wrong if we just set the name to escapeReservedWord
|
||||
@@ -646,137 +669,6 @@ 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)
|
||||
*
|
||||
@@ -813,49 +705,6 @@ 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);
|
||||
@@ -1020,6 +869,7 @@ 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) {
|
||||
@@ -1027,11 +877,13 @@ 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,7 +192,6 @@ 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,7 +296,6 @@ 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 SPRING_HTTP_INTERFACE.equals(library) ? DocumentationProvider.NONE : DocumentationProvider.SPRINGDOC;
|
||||
return isLibrary(SPRING_HTTP_INTERFACE) ? null : DocumentationProvider.SPRINGDOC;
|
||||
}
|
||||
|
||||
public List<DocumentationProvider> supportedDocumentationProvider() {
|
||||
@@ -370,8 +370,21 @@ 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())) {
|
||||
@@ -530,7 +543,6 @@ 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");
|
||||
@@ -1191,6 +1203,13 @@ 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}} ||
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&{{/vendorExtensions.x-is-value-type}}
|
||||
{{#isNullable}}{{name}} != null &&{{/isNullable}}
|
||||
{{name}}.Equals(other.{{name}})
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}}
|
||||
(
|
||||
{{name}} == other.{{name}} ||
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&
|
||||
{{#isNullable}}{{name}} != null &&
|
||||
other.{{name}} != null &&
|
||||
{{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(other.{{name}})
|
||||
{{/isNullable}}{{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}}
|
||||
{{^vendorExtensions.x-is-value-type}}if ({{name}} != null){{/vendorExtensions.x-is-value-type}}
|
||||
{{#isNullable}}if ({{name}} != null){{/isNullable}}
|
||||
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-is-value-type}}true{{/vendorExtensions.x-is-value-type}}{{^vendorExtensions.x-is-value-type}}false{{/vendorExtensions.x-is-value-type}}{{/isNullable}})]
|
||||
[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}})]
|
||||
{{#isEnum}}
|
||||
public {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{name}} { get; set; }{{#defaultValue}} = {{{.}}};{{/defaultValue}}
|
||||
{{/isEnum}}
|
||||
@@ -144,14 +144,14 @@ namespace {{modelPackage}}
|
||||
return {{#vars}}{{^isContainer}}
|
||||
(
|
||||
{{name}} == other.{{name}} ||
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&{{/vendorExtensions.x-is-value-type}}
|
||||
{{#isNullable}}{{name}} != null &&{{/isNullable}}
|
||||
{{name}}.Equals(other.{{name}})
|
||||
){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}}
|
||||
(
|
||||
{{name}} == other.{{name}} ||
|
||||
{{^vendorExtensions.x-is-value-type}}{{name}} != null &&
|
||||
{{#isNullable}}{{name}} != null &&
|
||||
other.{{name}} != null &&
|
||||
{{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(other.{{name}})
|
||||
{{/isNullable}}{{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}}
|
||||
{{^vendorExtensions.x-is-value-type}}if ({{name}} != null){{/vendorExtensions.x-is-value-type}}
|
||||
{{#isNullable}}if ({{name}} != null){{/isNullable}}
|
||||
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}}.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}});
|
||||
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}});
|
||||
|
||||
{{/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}}.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}});
|
||||
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}});
|
||||
{{/composedSchemas.oneOf}}
|
||||
}
|
||||
|
||||
|
||||
@@ -135,6 +135,14 @@ 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>
|
||||
@@ -142,7 +150,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// <param name="{{paramName}}"></param>
|
||||
{{/allParams}}
|
||||
/// <returns></returns>
|
||||
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}})
|
||||
private void Validate{{operationId}}({{#requiredAndNotNullableParams}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullableParams}})
|
||||
{
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#-first}}
|
||||
@@ -163,14 +171,14 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{/nrt}}
|
||||
{{#-last}}
|
||||
#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'
|
||||
|
||||
#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'
|
||||
{{/-last}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
return{{#allParams}} {{#-first}}{{^-last}}({{/-last}}{{/-first}}{{paramName}}{{^-last}},{{/-last}}{{#-last}}{{^-first}}){{/-first}}{{/-last}}{{/allParams}};
|
||||
}
|
||||
|
||||
{{/-first}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -231,17 +239,18 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
|
||||
try
|
||||
{
|
||||
{{#allParams}}{{#-first}}{{#-last}}{{paramName}} = {{/-last}}{{^-last}}var validatedParameterLocalVars = {{/-last}}{{/-first}}{{/allParams}}On{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#-first}}
|
||||
Validate{{operationId}}({{#requiredAndNotNullableParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullableParams}});
|
||||
|
||||
{{/-first}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
{{#allParams}}
|
||||
{{#-first}}
|
||||
{{^-last}}
|
||||
{{#allParams}}
|
||||
{{paramName}} = validatedParameterLocalVars.Item{{-index}};
|
||||
{{/allParams}}
|
||||
{{/-last}}
|
||||
Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
|
||||
{{/-first}}
|
||||
{{/allParams}}
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
{{^servers}}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
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}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}
|
||||
module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}
|
||||
|
||||
go 1.19
|
||||
go 1.18
|
||||
|
||||
{{#routers}}
|
||||
{{#mux}}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
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==0.5.0
|
||||
aiofiles==23.1.0
|
||||
aniso8601==7.0.0
|
||||
async-exit-stack==1.0.1
|
||||
async-generator==1.10
|
||||
@@ -7,12 +7,13 @@ chardet==4.0.0
|
||||
click==7.1.2
|
||||
dnspython==2.1.0
|
||||
email-validator==1.1.2
|
||||
fastapi==0.65.1
|
||||
fastapi==0.95.2
|
||||
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
|
||||
@@ -26,7 +27,7 @@ PyYAML==5.4.1
|
||||
requests==2.25.1
|
||||
Rx==1.6.1
|
||||
six==1.16.0
|
||||
starlette==0.25.0
|
||||
starlette==0.27.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}}'], datetime):
|
||||
if isinstance(_params['{{paramName}}'], date):
|
||||
_query_params.append(('{{baseName}}', _params['{{paramName}}'].strftime(self.api_client.configuration.date_format)))
|
||||
else:
|
||||
_query_params.append(('{{baseName}}', _params['{{paramName}}']))
|
||||
|
||||
@@ -640,6 +640,36 @@ 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,7 +1385,6 @@ 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");
|
||||
@@ -1781,13 +1780,31 @@ 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")
|
||||
.hasImports("org.springdoc.core.annotations.ParameterObject", "org.springframework.data.domain.Pageable")
|
||||
.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<>();
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
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'], datetime):
|
||||
if isinstance(_params['date_query'], date):
|
||||
_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 = false)]
|
||||
[DataMember(Name = "files", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "marker", EmitDefaultValue = true)]
|
||||
public MultipartMixedRequestMarker Marker { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets StatusArray
|
||||
/// </summary>
|
||||
[DataMember(Name = "statusArray", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "statusArray", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "file", EmitDefaultValue = true)]
|
||||
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=false)]
|
||||
[DataMember(Name="type", EmitDefaultValue=true)]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Message
|
||||
/// </summary>
|
||||
[DataMember(Name="message", EmitDefaultValue=false)]
|
||||
[DataMember(Name="message", EmitDefaultValue=true)]
|
||||
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=false)]
|
||||
[DataMember(Name="name", EmitDefaultValue=true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -35,27 +35,27 @@ namespace Org.OpenAPITools.Models
|
||||
/// <summary>
|
||||
/// Gets or Sets Category
|
||||
/// </summary>
|
||||
[DataMember(Name="category", EmitDefaultValue=false)]
|
||||
[DataMember(Name="category", EmitDefaultValue=true)]
|
||||
public Category Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[Required]
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
[DataMember(Name="name", EmitDefaultValue=true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets PhotoUrls
|
||||
/// </summary>
|
||||
[Required]
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=false)]
|
||||
[DataMember(Name="photoUrls", EmitDefaultValue=true)]
|
||||
public List<string> PhotoUrls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Tags
|
||||
/// </summary>
|
||||
[DataMember(Name="tags", EmitDefaultValue=false)]
|
||||
[DataMember(Name="tags", EmitDefaultValue=true)]
|
||||
public List<Tag> Tags { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Models
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
[DataMember(Name="name", EmitDefaultValue=true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -35,37 +35,37 @@ namespace Org.OpenAPITools.Models
|
||||
/// <summary>
|
||||
/// Gets or Sets Username
|
||||
/// </summary>
|
||||
[DataMember(Name="username", EmitDefaultValue=false)]
|
||||
[DataMember(Name="username", EmitDefaultValue=true)]
|
||||
public string Username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets FirstName
|
||||
/// </summary>
|
||||
[DataMember(Name="firstName", EmitDefaultValue=false)]
|
||||
[DataMember(Name="firstName", EmitDefaultValue=true)]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[DataMember(Name="lastName", EmitDefaultValue=false)]
|
||||
[DataMember(Name="lastName", EmitDefaultValue=true)]
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Email
|
||||
/// </summary>
|
||||
[DataMember(Name="email", EmitDefaultValue=false)]
|
||||
[DataMember(Name="email", EmitDefaultValue=true)]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Password
|
||||
/// </summary>
|
||||
[DataMember(Name="password", EmitDefaultValue=false)]
|
||||
[DataMember(Name="password", EmitDefaultValue=true)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Phone
|
||||
/// </summary>
|
||||
[DataMember(Name="phone", EmitDefaultValue=false)]
|
||||
[DataMember(Name="phone", EmitDefaultValue=true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "activity_outputs", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "prop1", EmitDefaultValue = true)]
|
||||
public string Prop1
|
||||
{
|
||||
get{ return _Prop1;}
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Prop2
|
||||
/// </summary>
|
||||
[DataMember(Name = "prop2", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "prop2", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_property", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_of_map_property", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_1", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_2", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_anytype_3", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "empty_map", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_with_undeclared_properties_string", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "color", EmitDefaultValue = true)]
|
||||
public string Color
|
||||
{
|
||||
get{ return _Color;}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Type
|
||||
/// </summary>
|
||||
[DataMember(Name = "type", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "type", EmitDefaultValue = true)]
|
||||
public string Type
|
||||
{
|
||||
get{ return _Type;}
|
||||
@@ -109,7 +109,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Message
|
||||
/// </summary>
|
||||
[DataMember(Name = "message", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "message", EmitDefaultValue = true)]
|
||||
public string Message
|
||||
{
|
||||
get{ return _Message;}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Cultivar
|
||||
/// </summary>
|
||||
[DataMember(Name = "cultivar", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "cultivar", EmitDefaultValue = true)]
|
||||
public string Cultivar
|
||||
{
|
||||
get{ return _Cultivar;}
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Origin
|
||||
/// </summary>
|
||||
[DataMember(Name = "origin", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "origin", EmitDefaultValue = true)]
|
||||
public string Origin
|
||||
{
|
||||
get{ return _Origin;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayNumber
|
||||
/// </summary>
|
||||
[DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "ArrayArrayNumber", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "ArrayNumber", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "array_of_string", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "array_array_of_integer", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "array_array_of_model", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "smallCamel", EmitDefaultValue = true)]
|
||||
public string SmallCamel
|
||||
{
|
||||
get{ return _SmallCamel;}
|
||||
@@ -103,7 +103,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets CapitalCamel
|
||||
/// </summary>
|
||||
[DataMember(Name = "CapitalCamel", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "CapitalCamel", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "small_Snake", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "Capital_Snake", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "SCA_ETH_Flow_Points", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "ATT_NAME", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarClass
|
||||
/// </summary>
|
||||
[DataMember(Name = "_class", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "_class", EmitDefaultValue = true)]
|
||||
public string VarClass
|
||||
{
|
||||
get{ return _VarClass;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Breed
|
||||
/// </summary>
|
||||
[DataMember(Name = "breed", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "breed", EmitDefaultValue = true)]
|
||||
public string Breed
|
||||
{
|
||||
get{ return _Breed;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Breed
|
||||
/// </summary>
|
||||
[DataMember(Name = "breed", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "breed", EmitDefaultValue = true)]
|
||||
public string Breed
|
||||
{
|
||||
get{ return _Breed;}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MainShape
|
||||
/// </summary>
|
||||
[DataMember(Name = "mainShape", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "mainShape", EmitDefaultValue = true)]
|
||||
public Shape MainShape
|
||||
{
|
||||
get{ return _MainShape;}
|
||||
@@ -90,7 +90,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets ShapeOrNull
|
||||
/// </summary>
|
||||
[DataMember(Name = "shapeOrNull", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "shapeOrNull", EmitDefaultValue = true)]
|
||||
public ShapeOrNull ShapeOrNull
|
||||
{
|
||||
get{ return _ShapeOrNull;}
|
||||
@@ -138,7 +138,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Shapes
|
||||
/// </summary>
|
||||
[DataMember(Name = "shapes", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "shapes", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "array_enum", EmitDefaultValue = true)]
|
||||
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 = true)]
|
||||
[DataMember(Name = "outerEnum", EmitDefaultValue = false)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "sourceURI", EmitDefaultValue = true)]
|
||||
public string SourceURI
|
||||
{
|
||||
get{ return _SourceURI;}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets File
|
||||
/// </summary>
|
||||
[DataMember(Name = "file", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "file", EmitDefaultValue = true)]
|
||||
public File File
|
||||
{
|
||||
get{ return _File;}
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Files
|
||||
/// </summary>
|
||||
[DataMember(Name = "files", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "files", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "bar", EmitDefaultValue = true)]
|
||||
public string Bar
|
||||
{
|
||||
get{ return _Bar;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarString
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "string", EmitDefaultValue = true)]
|
||||
public Foo VarString
|
||||
{
|
||||
get{ return _VarString;}
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets VarString
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "string", EmitDefaultValue = true)]
|
||||
public string VarString
|
||||
{
|
||||
get{ return _VarString;}
|
||||
@@ -423,7 +423,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
/// </summary>
|
||||
[DataMember(Name = "binary", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "binary", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "pattern_with_digits", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "pattern_with_digits_and_delimiter", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "pattern_with_backslash", EmitDefaultValue = true)]
|
||||
public string PatternWithBackslash
|
||||
{
|
||||
get{ return _PatternWithBackslash;}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name = "bar", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "bar", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "foo", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "123-list", EmitDefaultValue = true)]
|
||||
public string var123List
|
||||
{
|
||||
get{ return _var123List;}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets EscapedLiteralString
|
||||
/// </summary>
|
||||
[DataMember(Name = "escapedLiteralString", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "escapedLiteralString", EmitDefaultValue = true)]
|
||||
public string EscapedLiteralString
|
||||
{
|
||||
get{ return _EscapedLiteralString;}
|
||||
@@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets UnescapedLiteralString
|
||||
/// </summary>
|
||||
[DataMember(Name = "unescapedLiteralString", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "unescapedLiteralString", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_map_of_string", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map_of_enum_string", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "direct_map", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "indirect_map", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "map", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "class", EmitDefaultValue = true)]
|
||||
public string VarClass
|
||||
{
|
||||
get{ return _VarClass;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets varClient
|
||||
/// </summary>
|
||||
[DataMember(Name = "client", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "client", EmitDefaultValue = true)]
|
||||
public string varClient
|
||||
{
|
||||
get{ return _varClient;}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Property
|
||||
/// </summary>
|
||||
[DataMember(Name = "property", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "property", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "array_items_nullable", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "object_items_nullable", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "uuid", EmitDefaultValue = true)]
|
||||
public string Uuid
|
||||
{
|
||||
get{ return _Uuid;}
|
||||
@@ -116,7 +116,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets DeprecatedRef
|
||||
/// </summary>
|
||||
[DataMember(Name = "deprecatedRef", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "deprecatedRef", EmitDefaultValue = true)]
|
||||
[Obsolete]
|
||||
public DeprecatedObject DeprecatedRef
|
||||
{
|
||||
@@ -141,7 +141,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Bars
|
||||
/// </summary>
|
||||
[DataMember(Name = "bars", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "bars", EmitDefaultValue = true)]
|
||||
[Obsolete]
|
||||
public List<string> Bars
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets MyString
|
||||
/// </summary>
|
||||
[DataMember(Name = "my_string", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "my_string", EmitDefaultValue = true)]
|
||||
public string MyString
|
||||
{
|
||||
get{ return _MyString;}
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Category
|
||||
/// </summary>
|
||||
[DataMember(Name = "category", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "category", EmitDefaultValue = true)]
|
||||
public Category Category
|
||||
{
|
||||
get{ return _Category;}
|
||||
@@ -239,7 +239,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Tags
|
||||
/// </summary>
|
||||
[DataMember(Name = "tags", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "tags", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "bar", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "baz", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "_special_model.name_", EmitDefaultValue = true)]
|
||||
public string VarSpecialModelName
|
||||
{
|
||||
get{ return _VarSpecialModelName;}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Name
|
||||
/// </summary>
|
||||
[DataMember(Name = "name", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "name", EmitDefaultValue = true)]
|
||||
public string Name
|
||||
{
|
||||
get{ return _Name;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Value
|
||||
/// </summary>
|
||||
[DataMember(Name = "value", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "value", EmitDefaultValue = true)]
|
||||
public string Value
|
||||
{
|
||||
get{ return _Value;}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets TestCollectionEndingWithWordList
|
||||
/// </summary>
|
||||
[DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "TestCollectionEndingWithWordList", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "username", EmitDefaultValue = true)]
|
||||
public string Username
|
||||
{
|
||||
get{ return _Username;}
|
||||
@@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets FirstName
|
||||
/// </summary>
|
||||
[DataMember(Name = "firstName", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "firstName", EmitDefaultValue = true)]
|
||||
public string FirstName
|
||||
{
|
||||
get{ return _FirstName;}
|
||||
@@ -187,7 +187,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets LastName
|
||||
/// </summary>
|
||||
[DataMember(Name = "lastName", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "lastName", EmitDefaultValue = true)]
|
||||
public string LastName
|
||||
{
|
||||
get{ return _LastName;}
|
||||
@@ -211,7 +211,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Email
|
||||
/// </summary>
|
||||
[DataMember(Name = "email", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "email", EmitDefaultValue = true)]
|
||||
public string Email
|
||||
{
|
||||
get{ return _Email;}
|
||||
@@ -235,7 +235,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Password
|
||||
/// </summary>
|
||||
[DataMember(Name = "password", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "password", EmitDefaultValue = true)]
|
||||
public string Password
|
||||
{
|
||||
get{ return _Password;}
|
||||
@@ -259,7 +259,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <summary>
|
||||
/// Gets or Sets Phone
|
||||
/// </summary>
|
||||
[DataMember(Name = "phone", EmitDefaultValue = false)]
|
||||
[DataMember(Name = "phone", EmitDefaultValue = true)]
|
||||
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 = false)]
|
||||
[DataMember(Name = "objectWithNoDeclaredProps", EmitDefaultValue = true)]
|
||||
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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient? modelClient = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,12 +128,14 @@ 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>
|
||||
protected virtual ModelClient OnCall123TestSpecialTags(ModelClient modelClient)
|
||||
private void ValidateCall123TestSpecialTags(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'
|
||||
@@ -141,10 +143,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (modelClient == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>?> Call123TestSpecialTagsOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -193,13 +193,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>> Call123TestSpecialTagsAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
modelClient = OnCall123TestSpecialTags(modelClient);
|
||||
ValidateCall123TestSpecialTags(modelClient);
|
||||
|
||||
FormatCall123TestSpecialTags(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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> GetCountryAsync(string? country = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> GetCountryOrDefaultAsync(string? country = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Hello
|
||||
@@ -170,15 +170,6 @@ 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>
|
||||
@@ -227,8 +218,6 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnFooGet();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -274,12 +263,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetCountry(ref string? country);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="country"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual string OnGetCountry(string country)
|
||||
private void ValidateGetCountry(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'
|
||||
@@ -287,10 +278,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (country == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -298,7 +287,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -309,7 +298,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.");
|
||||
}
|
||||
@@ -320,7 +309,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> GetCountryOrDefaultAsync(string? country = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -339,13 +328,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> GetCountryAsync(string? country = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
country = OnGetCountry(country);
|
||||
ValidateGetCountry(country);
|
||||
|
||||
FormatGetCountry(ref country);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -402,15 +393,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnHello()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -459,8 +441,6 @@ 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestBodyWithFileSchemaAsync(FileSchemaTestClass? fileSchemaTestClass = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass? fileSchemaTestClass = null, 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, string query, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestBodyWithQueryParamsAsync(User? user = null, string? query = null, 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, string query, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestBodyWithQueryParamsOrDefaultAsync(User? user = null, string? query = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>> TestClientModelAsync(ModelClient? modelClient = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>?> TestClientModelOrDefaultAsync(ModelClient? modelClient = null, 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, 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);
|
||||
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);
|
||||
|
||||
/// <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, 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);
|
||||
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);
|
||||
|
||||
/// <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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestInlineAdditionalPropertiesAsync(Dictionary<string, string>? requestBody = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string>? requestBody = null, 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, string param2, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> TestJsonFormDataAsync(string? param = null, string? param2 = null, 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, string param2, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> TestJsonFormDataOrDefaultAsync(string? param = null, string? param2 = null, 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, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default);
|
||||
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);
|
||||
|
||||
/// <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, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,15 +510,6 @@ 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>
|
||||
@@ -567,8 +558,6 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnFakeHealthGet();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -614,15 +603,7 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual bool? OnFakeOuterBooleanSerialize(bool? body)
|
||||
{
|
||||
return body;
|
||||
}
|
||||
partial void FormatFakeOuterBooleanSerialize(ref bool? body);
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@@ -676,7 +657,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
body = OnFakeOuterBooleanSerialize(body);
|
||||
FormatFakeOuterBooleanSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -736,15 +717,7 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="outerComposite"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual OuterComposite? OnFakeOuterCompositeSerialize(OuterComposite? outerComposite)
|
||||
{
|
||||
return outerComposite;
|
||||
}
|
||||
partial void FormatFakeOuterCompositeSerialize(OuterComposite? outerComposite);
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@@ -798,7 +771,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
outerComposite = OnFakeOuterCompositeSerialize(outerComposite);
|
||||
FormatFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -858,15 +831,7 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual decimal? OnFakeOuterNumberSerialize(decimal? body)
|
||||
{
|
||||
return body;
|
||||
}
|
||||
partial void FormatFakeOuterNumberSerialize(ref decimal? body);
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
@@ -920,7 +885,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
body = OnFakeOuterNumberSerialize(body);
|
||||
FormatFakeOuterNumberSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -980,13 +945,15 @@ 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>
|
||||
protected virtual (Guid, string?) OnFakeOuterStringSerialize(Guid requiredStringUuid, string? body)
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid)
|
||||
{
|
||||
#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'
|
||||
@@ -994,10 +961,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredStringUuid == null)
|
||||
throw new ArgumentNullException(nameof(requiredStringUuid));
|
||||
|
||||
#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);
|
||||
#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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1056,9 +1021,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnFakeOuterStringSerialize(requiredStringUuid, body);
|
||||
requiredStringUuid = validatedParameterLocalVars.Item1;
|
||||
body = validatedParameterLocalVars.Item2;
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid);
|
||||
|
||||
FormatFakeOuterStringSerialize(ref requiredStringUuid, ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1124,15 +1089,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnGetArrayOfEnums()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -1181,8 +1137,6 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnGetArrayOfEnums();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -1228,12 +1182,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestBodyWithFileSchema(FileSchemaTestClass? fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="fileSchemaTestClass"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual FileSchemaTestClass OnTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass)
|
||||
private void ValidateTestBodyWithFileSchema(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'
|
||||
@@ -1241,10 +1197,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (fileSchemaTestClass == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1252,7 +1206,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1263,7 +1217,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.");
|
||||
}
|
||||
@@ -1274,7 +1228,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass? fileSchemaTestClass = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1293,13 +1247,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestBodyWithFileSchemaAsync(FileSchemaTestClass? fileSchemaTestClass = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
fileSchemaTestClass = OnTestBodyWithFileSchema(fileSchemaTestClass);
|
||||
ValidateTestBodyWithFileSchema(fileSchemaTestClass);
|
||||
|
||||
FormatTestBodyWithFileSchema(fileSchemaTestClass);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1350,13 +1306,15 @@ 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>
|
||||
protected virtual (User, string) OnTestBodyWithQueryParams(User user, string query)
|
||||
private void ValidateTestBodyWithQueryParams(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'
|
||||
@@ -1367,10 +1325,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (query == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (user, 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1379,7 +1335,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1391,7 +1347,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.");
|
||||
}
|
||||
@@ -1403,7 +1359,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, string query, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestBodyWithQueryParamsOrDefaultAsync(User? user = null, string? query = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1423,15 +1379,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, string query, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestBodyWithQueryParamsAsync(User? user = null, string? query = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnTestBodyWithQueryParams(user, query);
|
||||
user = validatedParameterLocalVars.Item1;
|
||||
query = validatedParameterLocalVars.Item2;
|
||||
ValidateTestBodyWithQueryParams(user, query);
|
||||
|
||||
FormatTestBodyWithQueryParams(user, ref query);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1488,12 +1444,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestClientModel(ModelClient? modelClient);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="modelClient"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual ModelClient OnTestClientModel(ModelClient modelClient)
|
||||
private void ValidateTestClientModel(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'
|
||||
@@ -1501,10 +1459,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (modelClient == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1512,7 +1468,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1523,7 +1479,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.");
|
||||
}
|
||||
@@ -1534,7 +1490,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>?> TestClientModelOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1553,13 +1509,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>> TestClientModelAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
modelClient = OnTestClientModel(modelClient);
|
||||
ValidateTestClientModel(modelClient);
|
||||
|
||||
FormatTestClientModel(modelClient);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1619,6 +1577,8 @@ 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>
|
||||
@@ -1637,7 +1597,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
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)
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter)
|
||||
{
|
||||
#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'
|
||||
@@ -1654,10 +1614,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (patternWithoutDelimiter == null)
|
||||
throw new ArgumentNullException(nameof(patternWithoutDelimiter));
|
||||
|
||||
#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);
|
||||
#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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1678,7 +1636,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1702,7 +1660,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.");
|
||||
}
|
||||
@@ -1726,7 +1684,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, 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)
|
||||
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)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1758,27 +1716,15 @@ 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, 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)
|
||||
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)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
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;
|
||||
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);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1889,22 +1835,7 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <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);
|
||||
}
|
||||
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>
|
||||
/// Processes the server response
|
||||
@@ -1986,15 +1917,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
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;
|
||||
FormatTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, ref enumQueryDouble, ref enumQueryInteger, enumFormStringArray, ref enumHeaderString, ref enumQueryString, ref enumFormString);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -2074,6 +1997,8 @@ 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>
|
||||
@@ -2084,7 +2009,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual (bool, int, long, bool?, int?, long?) OnTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group)
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group)
|
||||
{
|
||||
#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'
|
||||
@@ -2098,10 +2023,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredInt64Group == null)
|
||||
throw new ArgumentNullException(nameof(requiredInt64Group));
|
||||
|
||||
#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);
|
||||
#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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2176,13 +2099,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
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;
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group);
|
||||
|
||||
FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredStringGroup, ref requiredInt64Group, ref booleanGroup, ref stringGroup, ref int64Group);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -2250,12 +2169,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatTestInlineAdditionalProperties(Dictionary<string, string>? requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requestBody"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual Dictionary<string, string> OnTestInlineAdditionalProperties(Dictionary<string, string> requestBody)
|
||||
private void ValidateTestInlineAdditionalProperties(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'
|
||||
@@ -2263,10 +2184,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (requestBody == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2274,7 +2193,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2285,7 +2204,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.");
|
||||
}
|
||||
@@ -2296,7 +2215,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary<string, string>? requestBody = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2315,13 +2234,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestInlineAdditionalPropertiesAsync(Dictionary<string, string>? requestBody = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
requestBody = OnTestInlineAdditionalProperties(requestBody);
|
||||
ValidateTestInlineAdditionalProperties(requestBody);
|
||||
|
||||
FormatTestInlineAdditionalProperties(requestBody);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -2372,13 +2293,15 @@ 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>
|
||||
protected virtual (string, string) OnTestJsonFormData(string param, string param2)
|
||||
private void ValidateTestJsonFormData(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'
|
||||
@@ -2389,10 +2312,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (param2 == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (param, 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2401,7 +2322,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2413,7 +2334,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.");
|
||||
}
|
||||
@@ -2425,7 +2346,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, string param2, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> TestJsonFormDataOrDefaultAsync(string? param = null, string? param2 = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2445,15 +2366,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, string param2, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> TestJsonFormDataAsync(string? param = null, string? param2 = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnTestJsonFormData(param, param2);
|
||||
param = validatedParameterLocalVars.Item1;
|
||||
param2 = validatedParameterLocalVars.Item2;
|
||||
ValidateTestJsonFormData(param, param2);
|
||||
|
||||
FormatTestJsonFormData(ref param, ref param2);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -2514,6 +2435,8 @@ 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>
|
||||
@@ -2523,7 +2446,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="url"></param>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
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)
|
||||
private void ValidateTestQueryParameterCollectionFormat(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'
|
||||
@@ -2543,10 +2466,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (context == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (pipe, ioutil, http, url, 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2558,7 +2479,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2573,7 +2494,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.");
|
||||
}
|
||||
@@ -2588,7 +2509,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, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default)
|
||||
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)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2611,18 +2532,15 @@ 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, List<string> ioutil, List<string> http, List<string> url, List<string> context, System.Threading.CancellationToken cancellationToken = default)
|
||||
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)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
pipe = validatedParameterLocalVars.Item1;
|
||||
ioutil = validatedParameterLocalVars.Item2;
|
||||
http = validatedParameterLocalVars.Item3;
|
||||
url = validatedParameterLocalVars.Item4;
|
||||
context = validatedParameterLocalVars.Item5;
|
||||
ValidateTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
|
||||
FormatTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
|
||||
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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient? modelClient = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,12 +128,14 @@ 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>
|
||||
protected virtual ModelClient OnTestClassname(ModelClient modelClient)
|
||||
private void ValidateTestClassname(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'
|
||||
@@ -141,10 +143,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (modelClient == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>?> TestClassnameOrDefaultAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -193,13 +193,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ModelClient>> TestClassnameAsync(ModelClient? modelClient = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
modelClient = OnTestClassname(modelClient);
|
||||
ValidateTestClassname(modelClient);
|
||||
|
||||
FormatTestClassname(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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> AddPetAsync(Pet? pet = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> AddPetOrDefaultAsync(Pet? pet = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>> FindPetsByStatusAsync(List<string>? status = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>?> FindPetsByStatusOrDefaultAsync(List<string>? status = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>> FindPetsByTagsAsync(List<string>? tags = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<List<Pet>>?> FindPetsByTagsOrDefaultAsync(List<string>? tags = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> UpdatePetAsync(Pet? pet = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> UpdatePetOrDefaultAsync(Pet? pet = null, 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, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsync(System.IO.Stream? requiredFile = null, 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, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream? requiredFile = null, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,12 +326,14 @@ 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>
|
||||
protected virtual Pet OnAddPet(Pet pet)
|
||||
private void ValidateAddPet(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'
|
||||
@@ -339,10 +341,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (pet == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> AddPetOrDefaultAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -391,13 +391,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> AddPetAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
pet = OnAddPet(pet);
|
||||
ValidateAddPet(pet);
|
||||
|
||||
FormatAddPet(pet);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -473,13 +475,15 @@ 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>
|
||||
protected virtual (long, string?) OnDeletePet(long petId, string? apiKey)
|
||||
private void ValidateDeletePet(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'
|
||||
@@ -487,10 +491,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (petId, apiKey);
|
||||
#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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -549,9 +551,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnDeletePet(petId, apiKey);
|
||||
petId = validatedParameterLocalVars.Item1;
|
||||
apiKey = validatedParameterLocalVars.Item2;
|
||||
ValidateDeletePet(petId);
|
||||
|
||||
FormatDeletePet(ref petId, ref apiKey);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -604,12 +606,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFindPetsByStatus(List<string>? status);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual List<string> OnFindPetsByStatus(List<string> status)
|
||||
private void ValidateFindPetsByStatus(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'
|
||||
@@ -617,10 +621,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (status == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -628,7 +630,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -639,7 +641,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.");
|
||||
}
|
||||
@@ -650,7 +652,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByStatusOrDefaultAsync(List<string>? status = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -669,13 +671,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByStatusAsync(List<string>? status = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
status = OnFindPetsByStatus(status);
|
||||
ValidateFindPetsByStatus(status);
|
||||
|
||||
FormatFindPetsByStatus(status);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -753,12 +757,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatFindPetsByTags(List<string>? tags);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="tags"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual List<string> OnFindPetsByTags(List<string> tags)
|
||||
private void ValidateFindPetsByTags(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'
|
||||
@@ -766,10 +772,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (tags == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -777,7 +781,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -788,7 +792,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.");
|
||||
}
|
||||
@@ -799,7 +803,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>?> FindPetsByTagsOrDefaultAsync(List<string>? tags = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -818,13 +822,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<List<Pet>>> FindPetsByTagsAsync(List<string>? tags = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
tags = OnFindPetsByTags(tags);
|
||||
ValidateFindPetsByTags(tags);
|
||||
|
||||
FormatFindPetsByTags(tags);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -902,12 +908,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetPetById(ref long petId);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual long OnGetPetById(long petId)
|
||||
private void ValidateGetPetById(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'
|
||||
@@ -915,10 +923,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -973,7 +979,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
petId = OnGetPetById(petId);
|
||||
ValidateGetPetById(petId);
|
||||
|
||||
FormatGetPetById(ref petId);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1031,12 +1039,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUpdatePet(Pet? pet);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="pet"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual Pet OnUpdatePet(Pet pet)
|
||||
private void ValidateUpdatePet(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'
|
||||
@@ -1044,10 +1054,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (pet == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1055,7 +1063,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1066,7 +1074,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.");
|
||||
}
|
||||
@@ -1077,7 +1085,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> UpdatePetOrDefaultAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1096,13 +1104,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> UpdatePetAsync(Pet? pet = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
pet = OnUpdatePet(pet);
|
||||
ValidateUpdatePet(pet);
|
||||
|
||||
FormatUpdatePet(pet);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1178,6 +1188,8 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUpdatePetWithForm(ref long petId, ref string? name, ref string? status);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1185,7 +1197,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual (long, string?, string?) OnUpdatePetWithForm(long petId, string? name, string? status)
|
||||
private void ValidateUpdatePetWithForm(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'
|
||||
@@ -1193,10 +1205,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (petId, name, 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1259,10 +1269,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnUpdatePetWithForm(petId, name, status);
|
||||
petId = validatedParameterLocalVars.Item1;
|
||||
name = validatedParameterLocalVars.Item2;
|
||||
status = validatedParameterLocalVars.Item3;
|
||||
ValidateUpdatePetWithForm(petId);
|
||||
|
||||
FormatUpdatePetWithForm(ref petId, ref name, ref status);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1333,6 +1342,8 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUploadFile(ref long petId, ref System.IO.Stream? file, ref string? additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1340,7 +1351,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual (long, System.IO.Stream?, string?) OnUploadFile(long petId, System.IO.Stream? file, string? additionalMetadata)
|
||||
private void ValidateUploadFile(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'
|
||||
@@ -1348,10 +1359,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (petId, file, additionalMetadata);
|
||||
#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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1414,10 +1423,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnUploadFile(petId, file, additionalMetadata);
|
||||
petId = validatedParameterLocalVars.Item1;
|
||||
file = validatedParameterLocalVars.Item2;
|
||||
additionalMetadata = validatedParameterLocalVars.Item3;
|
||||
ValidateUploadFile(petId);
|
||||
|
||||
FormatUploadFile(ref petId, ref file, ref additionalMetadata);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1497,6 +1505,8 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatUploadFileWithRequiredFile(ref System.IO.Stream? requiredFile, ref long petId, ref string? additionalMetadata);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
@@ -1504,7 +1514,7 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual (System.IO.Stream, long, string?) OnUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string? additionalMetadata)
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, 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'
|
||||
@@ -1515,10 +1525,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (requiredFile, petId, additionalMetadata);
|
||||
#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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1528,7 +1536,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1541,7 +1549,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.");
|
||||
}
|
||||
@@ -1554,7 +1562,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, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ApiResponse>?> UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream? requiredFile = null, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1575,16 +1583,15 @@ 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, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<ApiResponse>> UploadFileWithRequiredFileAsync(System.IO.Stream? requiredFile = null, long petId, string? additionalMetadata = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata);
|
||||
requiredFile = validatedParameterLocalVars.Item1;
|
||||
petId = validatedParameterLocalVars.Item2;
|
||||
additionalMetadata = validatedParameterLocalVars.Item3;
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId);
|
||||
|
||||
FormatUploadFileWithRequiredFile(ref requiredFile, ref petId, ref additionalMetadata);
|
||||
|
||||
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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> DeleteOrderAsync(string? orderId = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> DeleteOrderOrDefaultAsync(string? orderId = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<Order>> PlaceOrderAsync(Order? order = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order? order = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,12 +195,14 @@ 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>
|
||||
protected virtual string OnDeleteOrder(string orderId)
|
||||
private void ValidateDeleteOrder(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'
|
||||
@@ -208,10 +210,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (orderId == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> DeleteOrderOrDefaultAsync(string? orderId = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -260,13 +260,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> DeleteOrderAsync(string? orderId = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
orderId = OnDeleteOrder(orderId);
|
||||
ValidateDeleteOrder(orderId);
|
||||
|
||||
FormatDeleteOrder(ref orderId);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -304,15 +306,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnGetInventory()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -361,8 +354,6 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnGetInventory();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -418,12 +409,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetOrderById(ref long orderId);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual long OnGetOrderById(long orderId)
|
||||
private void ValidateGetOrderById(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'
|
||||
@@ -431,10 +424,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (orderId == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -489,7 +480,9 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
orderId = OnGetOrderById(orderId);
|
||||
ValidateGetOrderById(orderId);
|
||||
|
||||
FormatGetOrderById(ref orderId);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -537,12 +530,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatPlaceOrder(Order? order);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="order"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual Order OnPlaceOrder(Order order)
|
||||
private void ValidatePlaceOrder(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'
|
||||
@@ -550,10 +545,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (order == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -561,7 +554,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -572,7 +565,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.");
|
||||
}
|
||||
@@ -583,7 +576,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<Order>?> PlaceOrderOrDefaultAsync(Order? order = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -602,13 +595,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<Order>> PlaceOrderAsync(Order? order = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
order = OnPlaceOrder(order);
|
||||
ValidatePlaceOrder(order);
|
||||
|
||||
FormatPlaceOrder(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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> CreateUserAsync(User? user = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> CreateUserOrDefaultAsync(User? user = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User>? user = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> CreateUsersWithArrayInputOrDefaultAsync(List<User>? user = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User>? user = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> CreateUsersWithListInputOrDefaultAsync(List<User>? user = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> DeleteUserAsync(string? username = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> DeleteUserOrDefaultAsync(string? username = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<User>> GetUserByNameAsync(string? username = null, 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, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<User>?> GetUserByNameOrDefaultAsync(string? username = null, 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, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<string>> LoginUserAsync(string? username = null, string? password = null, 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, string password, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<string>?> LoginUserOrDefaultAsync(string? username = null, string? password = null, 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, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>> UpdateUserAsync(User? user = null, string? username = null, 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, string username, System.Threading.CancellationToken cancellationToken = default);
|
||||
Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User? user = null, string? username = null, System.Threading.CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,12 +291,14 @@ 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>
|
||||
protected virtual User OnCreateUser(User user)
|
||||
private void ValidateCreateUser(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'
|
||||
@@ -304,10 +306,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> CreateUserOrDefaultAsync(User? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -356,13 +356,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> CreateUserAsync(User? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
user = OnCreateUser(user);
|
||||
ValidateCreateUser(user);
|
||||
|
||||
FormatCreateUser(user);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -413,12 +415,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatCreateUsersWithArrayInput(List<User>? user);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual List<User> OnCreateUsersWithArrayInput(List<User> user)
|
||||
private void ValidateCreateUsersWithArrayInput(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'
|
||||
@@ -426,10 +430,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -437,7 +439,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -448,7 +450,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.");
|
||||
}
|
||||
@@ -459,7 +461,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> CreateUsersWithArrayInputOrDefaultAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -478,13 +480,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> CreateUsersWithArrayInputAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
user = OnCreateUsersWithArrayInput(user);
|
||||
ValidateCreateUsersWithArrayInput(user);
|
||||
|
||||
FormatCreateUsersWithArrayInput(user);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -535,12 +539,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatCreateUsersWithListInput(List<User>? user);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual List<User> OnCreateUsersWithListInput(List<User> user)
|
||||
private void ValidateCreateUsersWithListInput(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'
|
||||
@@ -548,10 +554,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -559,7 +563,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -570,7 +574,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.");
|
||||
}
|
||||
@@ -581,7 +585,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> CreateUsersWithListInputOrDefaultAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -600,13 +604,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> CreateUsersWithListInputAsync(List<User>? user = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
user = OnCreateUsersWithListInput(user);
|
||||
ValidateCreateUsersWithListInput(user);
|
||||
|
||||
FormatCreateUsersWithListInput(user);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -657,12 +663,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatDeleteUser(ref string? username);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual string OnDeleteUser(string username)
|
||||
private void ValidateDeleteUser(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'
|
||||
@@ -670,10 +678,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (username == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -681,7 +687,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -692,7 +698,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.");
|
||||
}
|
||||
@@ -703,7 +709,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> DeleteUserOrDefaultAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -722,13 +728,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> DeleteUserAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
username = OnDeleteUser(username);
|
||||
ValidateDeleteUser(username);
|
||||
|
||||
FormatDeleteUser(ref username);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -766,12 +774,14 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
partial void FormatGetUserByName(ref string? username);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual string OnGetUserByName(string username)
|
||||
private void ValidateGetUserByName(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'
|
||||
@@ -779,10 +789,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (username == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -790,7 +798,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -801,7 +809,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.");
|
||||
}
|
||||
@@ -812,7 +820,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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<User>?> GetUserByNameOrDefaultAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -831,13 +839,15 @@ 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, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<User>> GetUserByNameAsync(string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
username = OnGetUserByName(username);
|
||||
ValidateGetUserByName(username);
|
||||
|
||||
FormatGetUserByName(ref username);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -885,13 +895,15 @@ 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>
|
||||
protected virtual (string, string) OnLoginUser(string username, string password)
|
||||
private void ValidateLoginUser(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'
|
||||
@@ -902,10 +914,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (password == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (username, 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -914,7 +924,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -926,7 +936,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.");
|
||||
}
|
||||
@@ -938,7 +948,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, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<string>?> LoginUserOrDefaultAsync(string? username = null, string? password = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -958,15 +968,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, string password, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<string>> LoginUserAsync(string? username = null, string? password = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnLoginUser(username, password);
|
||||
username = validatedParameterLocalVars.Item1;
|
||||
password = validatedParameterLocalVars.Item2;
|
||||
ValidateLoginUser(username, password);
|
||||
|
||||
FormatLoginUser(ref username, ref password);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
@@ -1021,15 +1031,6 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual void OnLogoutUser()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@@ -1078,8 +1079,6 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
OnLogoutUser();
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
@@ -1116,13 +1115,15 @@ 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>
|
||||
protected virtual (User, string) OnUpdateUser(User user, string username)
|
||||
private void ValidateUpdateUser(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'
|
||||
@@ -1133,10 +1134,8 @@ namespace Org.OpenAPITools.Api
|
||||
if (username == null)
|
||||
throw new ArgumentNullException(nameof(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'
|
||||
|
||||
return (user, 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'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1145,7 +1144,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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1157,7 +1156,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.");
|
||||
}
|
||||
@@ -1169,7 +1168,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, string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>?> UpdateUserOrDefaultAsync(User? user = null, string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1189,15 +1188,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, string username, System.Threading.CancellationToken cancellationToken = default)
|
||||
public async Task<ApiResponse<object>> UpdateUserAsync(User? user = null, string? username = null, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
var validatedParameterLocalVars = OnUpdateUser(user, username);
|
||||
user = validatedParameterLocalVars.Item1;
|
||||
username = validatedParameterLocalVars.Item2;
|
||||
ValidateUpdateUser(user, username);
|
||||
|
||||
FormatUpdateUser(user, ref username);
|
||||
|
||||
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)
|
||||
public Activity(Dictionary<string, List<ActivityOutputElementRepresentation>>? activityOutputs = default)
|
||||
{
|
||||
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, Object prop2)
|
||||
public ActivityOutputElementRepresentation(string? prop1 = default, Object? prop2 = default)
|
||||
{
|
||||
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, 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)
|
||||
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)
|
||||
{
|
||||
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, string color = @"red")
|
||||
public Animal(string? className = default, 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, string type)
|
||||
public ApiResponse(int code, string? message = default, string? type = default)
|
||||
{
|
||||
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, string origin)
|
||||
public Apple(string? cultivar = default, string? origin = default)
|
||||
{
|
||||
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, bool mealy)
|
||||
public AppleReq(string? cultivar = default, 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)
|
||||
public ArrayOfArrayOfNumberOnly(List<List<decimal>>? arrayArrayNumber = default)
|
||||
{
|
||||
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)
|
||||
public ArrayOfNumberOnly(List<decimal>? arrayNumber = default)
|
||||
{
|
||||
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, List<List<ReadOnlyFirst>> arrayArrayOfModel, List<string> arrayOfString)
|
||||
public ArrayTest(List<List<long>>? arrayArrayOfInteger = default, List<List<ReadOnlyFirst>>? arrayArrayOfModel = default, List<string>? arrayOfString = default)
|
||||
{
|
||||
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)
|
||||
public BasquePig(string? className = default)
|
||||
{
|
||||
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, string capitalCamel, string capitalSnake, string sCAETHFlowPoints, string smallCamel, string smallSnake)
|
||||
public Capitalization(string? aTTNAME = default, string? capitalCamel = default, string? capitalSnake = default, string? sCAETHFlowPoints = default, string? smallCamel = default, string? smallSnake = default)
|
||||
{
|
||||
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, string color = @"red") : base(className, color)
|
||||
internal Cat(Dictionary<string, int> dictionary, CatAllOf catAllOf, string? className = default, 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) : base(petType)
|
||||
internal ChildCat(ChildCatAllOf childCatAllOf, string? petType = default) : 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, PetTypeEnum petType = PetTypeEnum.ChildCat)
|
||||
public ChildCatAllOf(string? name = default, 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)
|
||||
public ClassModel(string? varClass = default)
|
||||
{
|
||||
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