mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
parent
b4c315ebce
commit
65e74a354d
@ -52,7 +52,6 @@ import org.openapitools.codegen.api.TemplatingEngineAdapter;
|
||||
import org.openapitools.codegen.config.GlobalSettings;
|
||||
import org.openapitools.codegen.examples.ExampleGenerator;
|
||||
import org.openapitools.codegen.languages.PhpNextgenClientCodegen;
|
||||
import org.openapitools.codegen.languages.RustAxumServerCodegen;
|
||||
import org.openapitools.codegen.languages.RustServerCodegen;
|
||||
import org.openapitools.codegen.meta.FeatureSet;
|
||||
import org.openapitools.codegen.meta.GeneratorMetadata;
|
||||
@ -707,7 +706,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* Removes importToRemove from the imports of objs, if present.
|
||||
* This is useful to remove imports that are already present in operations-related template files, to avoid importing the same thing twice.
|
||||
*
|
||||
* @param objs imports will be removed from this objs' imports collection
|
||||
* @param objs imports will be removed from this objs' imports collection
|
||||
* @param importToRemove the import statement to be removed
|
||||
*/
|
||||
protected void removeImport(OperationsMap objs, String importToRemove) {
|
||||
@ -2302,7 +2301,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* Any non-null value will cause {{#defaultValue} check to pass.
|
||||
*
|
||||
* @param codegenProperty Codegen Property
|
||||
* @param schema Parameter schema
|
||||
* @param schema Parameter schema
|
||||
* @return string presentation of the default value of the parameter
|
||||
*/
|
||||
public String toDefaultParameterValue(CodegenProperty codegenProperty, Schema<?> schema) {
|
||||
@ -2329,7 +2328,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* Return null if you do NOT want a default value.
|
||||
* Any non-null value will cause {{#defaultValue} check to pass.
|
||||
*
|
||||
* @param schema Property schema
|
||||
* @param schema Property schema
|
||||
* @param codegenProperty Codegen property
|
||||
* @return string presentation of the default value of the property
|
||||
*/
|
||||
@ -2372,7 +2371,6 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Schema<?> getSchemaAdditionalProperties(Schema schema) {
|
||||
Schema<?> inner = ModelUtils.getAdditionalProperties(schema);
|
||||
if (inner == null) {
|
||||
@ -3009,6 +3007,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
/**
|
||||
* A method that allows generators to pre-process test example payloads
|
||||
* This can be useful if one needs to change how values like null in string are represented
|
||||
*
|
||||
* @param data the test data payload
|
||||
* @return the updated test data payload
|
||||
*/
|
||||
@ -3019,6 +3018,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
/**
|
||||
* Processes any test cases if they exist in the components.x-test-examples vendor extensions
|
||||
* If they exist then cast them to java class instances and return them back in a map
|
||||
*
|
||||
* @param refToTestCases the component schema name that the test cases are for
|
||||
*/
|
||||
private HashMap<String, SchemaTestCase> extractSchemaTestCases(String refToTestCases) {
|
||||
@ -3055,7 +3055,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
/**
|
||||
* Sets the booleans that define the model's type
|
||||
*
|
||||
* @param model the model to update
|
||||
* @param model the model to update
|
||||
* @param schema the model's schema
|
||||
*/
|
||||
protected void updateModelForString(CodegenModel model, Schema schema) {
|
||||
@ -3313,7 +3313,6 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* @param sc The Schema that may contain the discriminator
|
||||
* @param discPropName The String that is the discriminator propertyName in the schema
|
||||
* @param visitedSchemas A set of visited schema names
|
||||
*
|
||||
*/
|
||||
private CodegenProperty discriminatorFound(String composedSchemaName, Schema sc, String discPropName, Set<String> visitedSchemas) {
|
||||
if (visitedSchemas.contains(composedSchemaName)) { // recursive schema definition found
|
||||
@ -3400,7 +3399,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
/**
|
||||
* Recursively look in Schema sc for the discriminator and return it
|
||||
*
|
||||
* @param sc The Schema that may contain the discriminator
|
||||
* @param sc The Schema that may contain the discriminator
|
||||
* @param visitedSchemas An array list of visited schemas
|
||||
*/
|
||||
private Discriminator recursiveGetDiscriminator(Schema sc, ArrayList<Schema> visitedSchemas) {
|
||||
@ -3620,9 +3619,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
Map<String, Object> vendorExtensions = cs.getExtensions();
|
||||
String mappingName =
|
||||
Optional.ofNullable(vendorExtensions)
|
||||
.map(ve -> ve.get("x-discriminator-value"))
|
||||
.map(discriminatorValue -> (String) discriminatorValue)
|
||||
.orElse(currentSchemaName);
|
||||
.map(ve -> ve.get("x-discriminator-value"))
|
||||
.map(discriminatorValue -> (String) discriminatorValue)
|
||||
.orElse(currentSchemaName);
|
||||
MappedModel mm = new MappedModel(mappingName, toModelName(currentSchemaName), !mappingName.equals(currentSchemaName));
|
||||
descendentSchemas.add(mm);
|
||||
}
|
||||
@ -3649,11 +3648,11 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
// the future..
|
||||
String propertyType =
|
||||
Optional.ofNullable(schema.getProperties())
|
||||
.map(p -> (Schema<?>) p.get(discriminatorPropertyName))
|
||||
.map(Schema::get$ref)
|
||||
.map(ModelUtils::getSimpleRef)
|
||||
.map(this::toModelName)
|
||||
.orElseGet(() -> typeMapping.get("string"));
|
||||
.map(p -> (Schema<?>) p.get(discriminatorPropertyName))
|
||||
.map(Schema::get$ref)
|
||||
.map(ModelUtils::getSimpleRef)
|
||||
.map(this::toModelName)
|
||||
.orElseGet(() -> typeMapping.get("string"));
|
||||
discriminator.setPropertyType(propertyType);
|
||||
|
||||
// check to see if the discriminator property is an enum string
|
||||
@ -3944,8 +3943,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* This method was kept when required was added to the fromProperty signature
|
||||
* to ensure that the change was non-breaking
|
||||
*
|
||||
* @param name name of the property
|
||||
* @param p OAS property schema
|
||||
* @param name name of the property
|
||||
* @param p OAS property schema
|
||||
* @return Codegen Property object
|
||||
*/
|
||||
public CodegenProperty fromProperty(String name, Schema p) {
|
||||
@ -3961,9 +3960,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* Any subsequent processing of the CodegenModel return value must be idempotent
|
||||
* for a given (String name, Schema schema).
|
||||
*
|
||||
* @param name name of the property
|
||||
* @param p OAS property schema
|
||||
* @param required true if the property is required in the next higher object schema, false otherwise
|
||||
* @param name name of the property
|
||||
* @param p OAS property schema
|
||||
* @param required true if the property is required in the next higher object schema, false otherwise
|
||||
* @param schemaIsFromAdditionalProperties true if the property is a required property defined by additional properties schema
|
||||
* If this is the actual additionalProperties schema not defining a required property, then
|
||||
* the value should be false
|
||||
@ -4742,7 +4741,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (contentType != null) {
|
||||
contentType = contentType.toLowerCase(Locale.ROOT);
|
||||
}
|
||||
if (!(this instanceof RustAxumServerCodegen) && contentType != null &&
|
||||
if (contentType != null &&
|
||||
(contentType.startsWith("application/x-www-form-urlencoded") ||
|
||||
contentType.startsWith("multipart"))) {
|
||||
// process form parameters
|
||||
@ -5909,10 +5908,10 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
/**
|
||||
* Add the model name of the child schema in a composed schema to the set of imports
|
||||
*
|
||||
* @param composed composed schema
|
||||
* @param composed composed schema
|
||||
* @param childSchema composed schema
|
||||
* @param model codegen model
|
||||
* @param modelName model name
|
||||
* @param model codegen model
|
||||
* @param modelName model name
|
||||
*/
|
||||
protected void addImport(Schema composed, Schema childSchema, CodegenModel model, String modelName) {
|
||||
if (composed == null || childSchema == null) {
|
||||
@ -6795,12 +6794,12 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
String enumValue = isDataTypeString(dataType)
|
||||
? enumUnknownDefaultCaseName
|
||||
: // This is a dummy value that attempts to avoid collisions with previously specified cases.
|
||||
// Int.max / 192
|
||||
// The number 192 that is used to calculate this random value, is the Swift Evolution proposal for frozen/non-frozen enums.
|
||||
// [SE-0192](https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md)
|
||||
// Since this functionality was born in the Swift 5 generator and latter on broth to all generators
|
||||
// https://github.com/OpenAPITools/openapi-generator/pull/11013
|
||||
String.valueOf(11184809);
|
||||
// Int.max / 192
|
||||
// The number 192 that is used to calculate this random value, is the Swift Evolution proposal for frozen/non-frozen enums.
|
||||
// [SE-0192](https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md)
|
||||
// Since this functionality was born in the Swift 5 generator and latter on broth to all generators
|
||||
// https://github.com/OpenAPITools/openapi-generator/pull/11013
|
||||
String.valueOf(11184809);
|
||||
|
||||
enumVar.put("name", toEnumVarName(enumName, dataType));
|
||||
enumVar.put("value", toEnumValue(enumValue, dataType));
|
||||
@ -7984,6 +7983,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
protected String getAdditionalPropertiesName() {
|
||||
return "additional_properties";
|
||||
}
|
||||
|
||||
private void addJsonSchemaForBodyRequestInCaseItsNotPresent(CodegenParameter codegenParameter, RequestBody body) {
|
||||
if (codegenParameter.jsonSchema == null)
|
||||
codegenParameter.jsonSchema = Json.pretty(body);
|
||||
@ -8250,8 +8250,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
/**
|
||||
* Add a given ComposedSchema as an interface model to be generated, assuming it has `oneOf` defined
|
||||
*
|
||||
* @param cs ComposedSchema object to create as interface model
|
||||
* @param type name to use for the generated interface model
|
||||
* @param cs ComposedSchema object to create as interface model
|
||||
* @param type name to use for the generated interface model
|
||||
*/
|
||||
public void addOneOfInterfaceModel(Schema cs, String type) {
|
||||
if (cs.getOneOf() == null) {
|
||||
@ -8441,7 +8441,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
// in other sub-schemas of allOf/anyOf/oneOf
|
||||
cp.vendorExtensions.putIfAbsent("x-duplicated-data-type", true);
|
||||
} else {
|
||||
if(isTypeErasedGenerics()) {
|
||||
if (isTypeErasedGenerics()) {
|
||||
dataTypeSet.add(cp.baseType);
|
||||
} else {
|
||||
dataTypeSet.add(cp.dataType);
|
||||
@ -8472,10 +8472,14 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getUseInlineModelResolver() { return true; }
|
||||
public boolean getUseInlineModelResolver() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getUseOpenapiNormalizer() { return true; }
|
||||
public boolean getUseOpenapiNormalizer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getOpenapiGeneratorIgnoreList() {
|
||||
@ -8492,7 +8496,9 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
And convert special characters like newline, tab, carriage return
|
||||
Into strings that can be rendered in the language that the generator will output to
|
||||
*/
|
||||
protected String handleSpecialCharacters(String name) { return name; }
|
||||
protected String handleSpecialCharacters(String name) {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to ensure that null or Schema is returned given an input Boolean/Schema/null
|
||||
|
@ -42,7 +42,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -62,7 +62,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -1,5 +1,13 @@
|
||||
#![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(
|
||||
missing_docs,
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -36,10 +36,10 @@ use crate::{models, types::*};
|
||||
{{/maxLength}}
|
||||
{{#pattern}}
|
||||
{{^isByteArray}}
|
||||
regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}",
|
||||
regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.uppercase}}),
|
||||
{{/isByteArray}}
|
||||
{{#isByteArray}}
|
||||
custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.lowercase}}"
|
||||
custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}HeaderParams_{{{paramName}}}{{/lambda.lowercase}}"),
|
||||
{{/isByteArray}}
|
||||
{{/pattern}}
|
||||
{{#maximum}}
|
||||
@ -128,10 +128,10 @@ use crate::{models, types::*};
|
||||
{{/maxLength}}
|
||||
{{#pattern}}
|
||||
{{^isByteArray}}
|
||||
regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}",
|
||||
regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.uppercase}}),
|
||||
{{/isByteArray}}
|
||||
{{#isByteArray}}
|
||||
custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.lowercase}}"
|
||||
custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}PathParams_{{{paramName}}}{{/lambda.lowercase}}"),
|
||||
{{/isByteArray}}
|
||||
{{/pattern}}
|
||||
{{#maximum}}
|
||||
@ -232,10 +232,10 @@ use crate::{models, types::*};
|
||||
{{/maxLength}}
|
||||
{{#pattern}}
|
||||
{{^isByteArray}}
|
||||
regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}",
|
||||
regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.uppercase}}),
|
||||
{{/isByteArray}}
|
||||
{{#isByteArray}}
|
||||
custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.lowercase}}"
|
||||
custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}QueryParams_{{{paramName}}}{{/lambda.lowercase}}"),
|
||||
{{/isByteArray}}
|
||||
{{/pattern}}
|
||||
{{#maximum}}
|
||||
@ -639,10 +639,10 @@ pub struct {{{classname}}} {
|
||||
{{/maxLength}}
|
||||
{{#pattern}}
|
||||
{{^isByteArray}}
|
||||
regex = "RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}",
|
||||
regex(path = *RE_{{#lambda.uppercase}}{{{classname}}}_{{{name}}}{{/lambda.uppercase}}),
|
||||
{{/isByteArray}}
|
||||
{{#isByteArray}}
|
||||
custom ="validate_byte_{{#lambda.lowercase}}{{{classname}}}_{{{name}}}{{/lambda.lowercase}}"
|
||||
custom(function = "validate_byte_{{#lambda.lowercase}}{{{classname}}}_{{{name}}}{{/lambda.lowercase}}"),
|
||||
{{/isByteArray}}
|
||||
{{/pattern}}
|
||||
{{#maximum}}
|
||||
|
@ -22,10 +22,10 @@
|
||||
{{/maxLength}}
|
||||
{{#pattern}}
|
||||
{{#isString}}
|
||||
regex = "RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}",
|
||||
regex(path = *RE_{{#lambda.uppercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.uppercase}}),
|
||||
{{/isString}}
|
||||
{{^isString}}
|
||||
custom ="validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.lowercase}}",
|
||||
custom(function = "validate_byte_{{#lambda.lowercase}}{{{operationIdCamelCase}}}BodyValidator{{/lambda.lowercase}}"),
|
||||
{{/isString}}
|
||||
{{/pattern}}
|
||||
{{#maximum}}
|
||||
@ -59,7 +59,7 @@
|
||||
{{^x-consumes-plain-text}}
|
||||
{{^hasValidation}}
|
||||
{{^isMap}}
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
{{/isMap}}
|
||||
{{/hasValidation}}
|
||||
body: &'a {{{dataType}}},
|
||||
@ -218,4 +218,4 @@ Ok((
|
||||
{{/x-consumes-multipart}}
|
||||
{{/x-consumes-multipart-related}}
|
||||
))
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
7.5.0-SNAPSHOT
|
||||
|
@ -20,7 +20,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -12,7 +12,7 @@ server, you can easily generate a server stub.
|
||||
To see how to make this your own, look here: [README]((https://openapi-generator.tech))
|
||||
|
||||
- API version: 1.0.7
|
||||
|
||||
- Generator version: 7.5.0-SNAPSHOT
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_imports,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -41,7 +41,6 @@ where
|
||||
fn multipart_related_request_post_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// MultipartRelatedRequestPost - POST /multipart_related_request
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn multipart_related_request_post<I, A>(
|
||||
@ -99,7 +98,6 @@ where
|
||||
fn multipart_request_post_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// MultipartRequestPost - POST /multipart_request
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn multipart_request_post<I, A>(
|
||||
@ -156,7 +154,6 @@ where
|
||||
fn multiple_identical_mime_types_post_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// MultipleIdenticalMimeTypesPost - POST /multiple-identical-mime-types
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn multiple_identical_mime_types_post<I, A>(
|
||||
|
@ -1 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
7.5.0-SNAPSHOT
|
||||
|
@ -20,7 +20,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -12,7 +12,7 @@ server, you can easily generate a server stub.
|
||||
To see how to make this your own, look here: [README]((https://openapi-generator.tech))
|
||||
|
||||
- API version: 1.0.7
|
||||
|
||||
- Generator version: 7.5.0-SNAPSHOT
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_imports,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -96,7 +96,6 @@ fn any_of_get_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// AnyOfGet - GET /any-of
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn any_of_get<I, A>(
|
||||
@ -219,7 +218,6 @@ fn callback_with_header_post_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// CallbackWithHeaderPost - POST /callback-with-header
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn callback_with_header_post<I, A>(
|
||||
@ -277,7 +275,6 @@ fn complex_query_param_get_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// ComplexQueryParamGet - GET /complex-query-param
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn complex_query_param_get<I, A>(
|
||||
@ -335,7 +332,6 @@ fn enum_in_path_path_param_get_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// EnumInPathPathParamGet - GET /enum_in_path/{path_param}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn enum_in_path_path_param_get<I, A>(
|
||||
@ -393,7 +389,6 @@ fn json_complex_query_param_get_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// JsonComplexQueryParamGet - GET /json-complex-query-param
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn json_complex_query_param_get<I, A>(
|
||||
@ -451,7 +446,6 @@ fn mandatory_request_header_get_validation(
|
||||
|
||||
Ok((header_params,))
|
||||
}
|
||||
|
||||
/// MandatoryRequestHeaderGet - GET /mandatory-request-header
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn mandatory_request_header_get<I, A>(
|
||||
@ -467,7 +461,7 @@ where
|
||||
{
|
||||
// Header parameters
|
||||
let header_params = {
|
||||
let header_x_header = headers.get(HeaderName::from_static("x-header"));
|
||||
let header_x_header = headers.get(HeaderName::from_static("x_header"));
|
||||
|
||||
let header_x_header = match header_x_header {
|
||||
Some(v) => match header::IntoHeaderValue::<String>::try_from((*v).clone()) {
|
||||
@ -538,7 +532,6 @@ where
|
||||
fn merge_patch_json_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// MergePatchJsonGet - GET /merge-patch-json
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn merge_patch_json_get<I, A>(
|
||||
@ -610,7 +603,6 @@ where
|
||||
fn multiget_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// MultigetGet - GET /multiget
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn multiget_get<I, A>(
|
||||
@ -796,7 +788,6 @@ where
|
||||
fn multiple_auth_scheme_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// MultipleAuthSchemeGet - GET /multiple_auth_scheme
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn multiple_auth_scheme_get<I, A>(
|
||||
@ -851,7 +842,6 @@ where
|
||||
fn one_of_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// OneOfGet - GET /one-of
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn one_of_get<I, A>(
|
||||
@ -920,7 +910,6 @@ where
|
||||
fn override_server_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// OverrideServerGet - GET /override-server
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn override_server_get<I, A>(
|
||||
@ -977,7 +966,6 @@ fn paramget_get_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// ParamgetGet - GET /paramget
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn paramget_get<I, A>(
|
||||
@ -1050,7 +1038,6 @@ where
|
||||
fn readonly_auth_scheme_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// ReadonlyAuthSchemeGet - GET /readonly_auth_scheme
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn readonly_auth_scheme_get<I, A>(
|
||||
@ -1109,7 +1096,6 @@ fn register_callback_post_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// RegisterCallbackPost - POST /register-callback
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn register_callback_post<I, A>(
|
||||
@ -1171,7 +1157,6 @@ fn required_octet_stream_put_validation(
|
||||
) -> std::result::Result<(Bytes,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// RequiredOctetStreamPut - PUT /required_octet_stream
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn required_octet_stream_put<I, A>(
|
||||
@ -1225,7 +1210,6 @@ where
|
||||
fn responses_with_headers_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// ResponsesWithHeadersGet - GET /responses_with_headers
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn responses_with_headers_get<I, A>(
|
||||
@ -1273,7 +1257,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers.insert(HeaderName::from_static("success-info"), success_info);
|
||||
response_headers.insert(HeaderName::from_static(""), success_info);
|
||||
}
|
||||
if let Some(bool_header) = bool_header {
|
||||
let bool_header = match header::IntoHeaderValue(bool_header).try_into() {
|
||||
@ -1287,8 +1271,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("bool-header"), bool_header);
|
||||
response_headers.insert(HeaderName::from_static(""), bool_header);
|
||||
}
|
||||
}
|
||||
if let Some(object_header) = object_header {
|
||||
@ -1303,8 +1286,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("object-header"), object_header);
|
||||
response_headers.insert(HeaderName::from_static(""), object_header);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1346,8 +1328,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("further-info"), further_info);
|
||||
response_headers.insert(HeaderName::from_static(""), further_info);
|
||||
}
|
||||
}
|
||||
if let Some(failure_info) = failure_info {
|
||||
@ -1362,8 +1343,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("failure-info"), failure_info);
|
||||
response_headers.insert(HeaderName::from_static(""), failure_info);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1388,7 +1368,6 @@ where
|
||||
fn rfc7807_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Rfc7807Get - GET /rfc7807
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn rfc7807_get<I, A>(
|
||||
@ -1495,7 +1474,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct UntypedPropertyGetBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::ObjectUntypedProps,
|
||||
}
|
||||
|
||||
@ -1510,7 +1489,6 @@ fn untyped_property_get_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// UntypedPropertyGet - GET /untyped_property
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn untyped_property_get<I, A>(
|
||||
@ -1564,7 +1542,6 @@ where
|
||||
fn uuid_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// UuidGet - GET /uuid
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn uuid_get<I, A>(
|
||||
@ -1639,7 +1616,6 @@ struct XmlExtraPostBodyValidator<'a> {
|
||||
fn xml_extra_post_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// XmlExtraPost - POST /xml_extra
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn xml_extra_post<I, A>(
|
||||
@ -1703,7 +1679,6 @@ struct XmlOtherPostBodyValidator<'a> {
|
||||
fn xml_other_post_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// XmlOtherPost - POST /xml_other
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn xml_other_post<I, A>(
|
||||
@ -1779,7 +1754,6 @@ struct XmlOtherPutBodyValidator<'a> {
|
||||
fn xml_other_put_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// XmlOtherPut - PUT /xml_other
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn xml_other_put<I, A>(
|
||||
@ -1843,7 +1817,6 @@ struct XmlPostBodyValidator<'a> {
|
||||
fn xml_post_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// XmlPost - POST /xml
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn xml_post<I, A>(
|
||||
@ -1907,7 +1880,6 @@ struct XmlPutBodyValidator<'a> {
|
||||
fn xml_put_validation(body: Bytes) -> std::result::Result<(Bytes,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// XmlPut - PUT /xml
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn xml_put<I, A>(
|
||||
@ -1961,7 +1933,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct CreateRepoBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::ObjectParam,
|
||||
}
|
||||
|
||||
@ -1974,7 +1946,6 @@ fn create_repo_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// CreateRepo - POST /repos
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn create_repo<I, A>(
|
||||
@ -2032,7 +2003,6 @@ fn get_repo_info_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// GetRepoInfo - GET /repos/{repoId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_repo_info<I, A>(
|
||||
|
@ -1 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
7.5.0-SNAPSHOT
|
||||
|
@ -20,7 +20,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -12,7 +12,7 @@ server, you can easily generate a server stub.
|
||||
To see how to make this your own, look here: [README]((https://openapi-generator.tech))
|
||||
|
||||
- API version: 0.0.1
|
||||
|
||||
- Generator version: 7.5.0-SNAPSHOT
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_imports,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -75,7 +75,6 @@ where
|
||||
fn op10_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op10Get - GET /op10
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op10_get<I, A>(
|
||||
@ -128,7 +127,6 @@ where
|
||||
fn op11_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op11Get - GET /op11
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op11_get<I, A>(
|
||||
@ -181,7 +179,6 @@ where
|
||||
fn op12_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op12Get - GET /op12
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op12_get<I, A>(
|
||||
@ -234,7 +231,6 @@ where
|
||||
fn op13_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op13Get - GET /op13
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op13_get<I, A>(
|
||||
@ -287,7 +283,6 @@ where
|
||||
fn op14_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op14Get - GET /op14
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op14_get<I, A>(
|
||||
@ -340,7 +335,6 @@ where
|
||||
fn op15_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op15Get - GET /op15
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op15_get<I, A>(
|
||||
@ -393,7 +387,6 @@ where
|
||||
fn op16_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op16Get - GET /op16
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op16_get<I, A>(
|
||||
@ -446,7 +439,6 @@ where
|
||||
fn op17_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op17Get - GET /op17
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op17_get<I, A>(
|
||||
@ -499,7 +491,6 @@ where
|
||||
fn op18_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op18Get - GET /op18
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op18_get<I, A>(
|
||||
@ -552,7 +543,6 @@ where
|
||||
fn op19_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op19Get - GET /op19
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op19_get<I, A>(
|
||||
@ -605,7 +595,6 @@ where
|
||||
fn op1_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op1Get - GET /op1
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op1_get<I, A>(
|
||||
@ -658,7 +647,6 @@ where
|
||||
fn op20_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op20Get - GET /op20
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op20_get<I, A>(
|
||||
@ -711,7 +699,6 @@ where
|
||||
fn op21_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op21Get - GET /op21
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op21_get<I, A>(
|
||||
@ -764,7 +751,6 @@ where
|
||||
fn op22_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op22Get - GET /op22
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op22_get<I, A>(
|
||||
@ -817,7 +803,6 @@ where
|
||||
fn op23_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op23Get - GET /op23
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op23_get<I, A>(
|
||||
@ -870,7 +855,6 @@ where
|
||||
fn op24_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op24Get - GET /op24
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op24_get<I, A>(
|
||||
@ -923,7 +907,6 @@ where
|
||||
fn op25_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op25Get - GET /op25
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op25_get<I, A>(
|
||||
@ -976,7 +959,6 @@ where
|
||||
fn op26_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op26Get - GET /op26
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op26_get<I, A>(
|
||||
@ -1029,7 +1011,6 @@ where
|
||||
fn op27_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op27Get - GET /op27
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op27_get<I, A>(
|
||||
@ -1082,7 +1063,6 @@ where
|
||||
fn op28_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op28Get - GET /op28
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op28_get<I, A>(
|
||||
@ -1135,7 +1115,6 @@ where
|
||||
fn op29_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op29Get - GET /op29
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op29_get<I, A>(
|
||||
@ -1188,7 +1167,6 @@ where
|
||||
fn op2_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op2Get - GET /op2
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op2_get<I, A>(
|
||||
@ -1241,7 +1219,6 @@ where
|
||||
fn op30_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op30Get - GET /op30
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op30_get<I, A>(
|
||||
@ -1294,7 +1271,6 @@ where
|
||||
fn op31_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op31Get - GET /op31
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op31_get<I, A>(
|
||||
@ -1347,7 +1323,6 @@ where
|
||||
fn op32_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op32Get - GET /op32
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op32_get<I, A>(
|
||||
@ -1400,7 +1375,6 @@ where
|
||||
fn op33_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op33Get - GET /op33
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op33_get<I, A>(
|
||||
@ -1453,7 +1427,6 @@ where
|
||||
fn op34_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op34Get - GET /op34
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op34_get<I, A>(
|
||||
@ -1506,7 +1479,6 @@ where
|
||||
fn op35_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op35Get - GET /op35
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op35_get<I, A>(
|
||||
@ -1559,7 +1531,6 @@ where
|
||||
fn op36_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op36Get - GET /op36
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op36_get<I, A>(
|
||||
@ -1612,7 +1583,6 @@ where
|
||||
fn op37_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op37Get - GET /op37
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op37_get<I, A>(
|
||||
@ -1665,7 +1635,6 @@ where
|
||||
fn op3_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op3Get - GET /op3
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op3_get<I, A>(
|
||||
@ -1718,7 +1687,6 @@ where
|
||||
fn op4_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op4Get - GET /op4
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op4_get<I, A>(
|
||||
@ -1771,7 +1739,6 @@ where
|
||||
fn op5_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op5Get - GET /op5
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op5_get<I, A>(
|
||||
@ -1824,7 +1791,6 @@ where
|
||||
fn op6_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op6Get - GET /op6
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op6_get<I, A>(
|
||||
@ -1877,7 +1843,6 @@ where
|
||||
fn op7_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op7Get - GET /op7
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op7_get<I, A>(
|
||||
@ -1930,7 +1895,6 @@ where
|
||||
fn op8_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op8Get - GET /op8
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op8_get<I, A>(
|
||||
@ -1983,7 +1947,6 @@ where
|
||||
fn op9_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Op9Get - GET /op9
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn op9_get<I, A>(
|
||||
|
@ -1 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
7.5.0-SNAPSHOT
|
||||
|
@ -22,7 +22,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -42,7 +42,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -12,7 +12,7 @@ server, you can easily generate a server stub.
|
||||
To see how to make this your own, look here: [README]((https://openapi-generator.tech))
|
||||
|
||||
- API version: 1.0.0
|
||||
|
||||
- Generator version: 7.5.0-SNAPSHOT
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_imports,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -2768,12 +2768,14 @@ pub struct FormatTest {
|
||||
pub double: Option<f64>,
|
||||
|
||||
#[serde(rename = "string")]
|
||||
#[validate(regex = "RE_FORMATTEST_STRING")]
|
||||
#[validate(
|
||||
regex(path = *RE_FORMATTEST_STRING),
|
||||
)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub string: Option<String>,
|
||||
|
||||
#[serde(rename = "byte")]
|
||||
#[validate(custom = "validate_byte_formattest_byte")]
|
||||
#[validate(custom(function = "validate_byte_formattest_byte"))]
|
||||
pub byte: ByteArray,
|
||||
|
||||
#[serde(rename = "binary")]
|
||||
|
@ -118,7 +118,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct TestSpecialTagsBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Client,
|
||||
}
|
||||
|
||||
@ -131,7 +131,6 @@ fn test_special_tags_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// TestSpecialTags - PATCH /v2/another-fake/dummy
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_special_tags<I, A>(
|
||||
@ -207,7 +206,6 @@ where
|
||||
fn call123example_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Call123example - GET /v2/fake/operation-with-numeric-id
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call123example<I, A>(
|
||||
@ -262,7 +260,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct FakeOuterBooleanSerializeBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::OuterBoolean,
|
||||
}
|
||||
|
||||
@ -277,7 +275,6 @@ fn fake_outer_boolean_serialize_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// FakeOuterBooleanSerialize - POST /v2/fake/outer/boolean
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn fake_outer_boolean_serialize<I, A>(
|
||||
@ -353,7 +350,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct FakeOuterCompositeSerializeBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::OuterComposite,
|
||||
}
|
||||
|
||||
@ -368,7 +365,6 @@ fn fake_outer_composite_serialize_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// FakeOuterCompositeSerialize - POST /v2/fake/outer/composite
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn fake_outer_composite_serialize<I, A>(
|
||||
@ -444,7 +440,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct FakeOuterNumberSerializeBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::OuterNumber,
|
||||
}
|
||||
|
||||
@ -459,7 +455,6 @@ fn fake_outer_number_serialize_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// FakeOuterNumberSerialize - POST /v2/fake/outer/number
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn fake_outer_number_serialize<I, A>(
|
||||
@ -535,7 +530,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct FakeOuterStringSerializeBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::OuterString,
|
||||
}
|
||||
|
||||
@ -550,7 +545,6 @@ fn fake_outer_string_serialize_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// FakeOuterStringSerialize - POST /v2/fake/outer/string
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn fake_outer_string_serialize<I, A>(
|
||||
@ -628,7 +622,6 @@ fn fake_response_with_numerical_description_validation() -> std::result::Result<
|
||||
{
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// FakeResponseWithNumericalDescription - GET /v2/fake/response-with-numerical-description
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn fake_response_with_numerical_description<I, A>(
|
||||
@ -689,7 +682,6 @@ fn hyphen_param_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// HyphenParam - GET /v2/fake/hyphenParam/{hyphen-param}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn hyphen_param<I, A>(
|
||||
@ -745,7 +737,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct TestBodyWithQueryParamsBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::User,
|
||||
}
|
||||
|
||||
@ -761,7 +753,6 @@ fn test_body_with_query_params_validation(
|
||||
|
||||
Ok((query_params, body))
|
||||
}
|
||||
|
||||
/// TestBodyWithQueryParams - PUT /v2/fake/body-with-query-params
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_body_with_query_params<I, A>(
|
||||
@ -820,7 +811,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct TestClientModelBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Client,
|
||||
}
|
||||
|
||||
@ -833,7 +824,6 @@ fn test_client_model_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// TestClientModel - PATCH /v2/fake
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_client_model<I, A>(
|
||||
@ -909,7 +899,6 @@ where
|
||||
fn test_endpoint_parameters_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// TestEndpointParameters - POST /v2/fake
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_endpoint_parameters<I, A>(
|
||||
@ -981,7 +970,6 @@ fn test_enum_parameters_validation(
|
||||
|
||||
Ok((header_params, query_params))
|
||||
}
|
||||
|
||||
/// TestEnumParameters - GET /v2/fake
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_enum_parameters<I, A>(
|
||||
@ -1106,7 +1094,6 @@ fn test_inline_additional_properties_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// TestInlineAdditionalProperties - POST /v2/fake/inline-additionalProperties
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_inline_additional_properties<I, A>(
|
||||
@ -1164,7 +1151,6 @@ where
|
||||
fn test_json_form_data_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// TestJsonFormData - GET /v2/fake/jsonFormData
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_json_form_data<I, A>(
|
||||
@ -1219,7 +1205,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct TestClassnameBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Client,
|
||||
}
|
||||
|
||||
@ -1232,7 +1218,6 @@ fn test_classname_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// TestClassname - PATCH /v2/fake_classname_test
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn test_classname<I, A>(
|
||||
@ -1307,7 +1292,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct AddPetBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Pet,
|
||||
}
|
||||
|
||||
@ -1318,7 +1303,6 @@ fn add_pet_validation(body: models::Pet) -> std::result::Result<(models::Pet,),
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// AddPet - POST /v2/pet
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn add_pet<I, A>(
|
||||
@ -1381,7 +1365,6 @@ fn delete_pet_validation(
|
||||
|
||||
Ok((header_params, path_params))
|
||||
}
|
||||
|
||||
/// DeletePet - DELETE /v2/pet/{petId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn delete_pet<I, A>(
|
||||
@ -1469,7 +1452,6 @@ fn find_pets_by_status_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// FindPetsByStatus - GET /v2/pet/findByStatus
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn find_pets_by_status<I, A>(
|
||||
@ -1547,7 +1529,6 @@ fn find_pets_by_tags_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// FindPetsByTags - GET /v2/pet/findByTags
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn find_pets_by_tags<I, A>(
|
||||
@ -1625,7 +1606,6 @@ fn get_pet_by_id_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// GetPetById - GET /v2/pet/{petId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_pet_by_id<I, A>(
|
||||
@ -1701,7 +1681,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct UpdatePetBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Pet,
|
||||
}
|
||||
|
||||
@ -1714,7 +1694,6 @@ fn update_pet_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// UpdatePet - PUT /v2/pet
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn update_pet<I, A>(
|
||||
@ -1783,7 +1762,6 @@ fn update_pet_with_form_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// UpdatePetWithForm - POST /v2/pet/{petId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn update_pet_with_form<I, A>(
|
||||
@ -1845,7 +1823,6 @@ fn upload_file_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// UploadFile - POST /v2/pet/{petId}/uploadImage
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn upload_file<I, A>(
|
||||
@ -1926,7 +1903,6 @@ fn delete_order_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// DeleteOrder - DELETE /v2/store/order/{order_id}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn delete_order<I, A>(
|
||||
@ -1987,7 +1963,6 @@ where
|
||||
fn get_inventory_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// GetInventory - GET /v2/store/inventory
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_inventory<I, A>(
|
||||
@ -2063,7 +2038,6 @@ fn get_order_by_id_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// GetOrderById - GET /v2/store/order/{order_id}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_order_by_id<I, A>(
|
||||
@ -2139,7 +2113,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct PlaceOrderBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Order,
|
||||
}
|
||||
|
||||
@ -2152,7 +2126,6 @@ fn place_order_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// PlaceOrder - POST /v2/store/order
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn place_order<I, A>(
|
||||
@ -2224,7 +2197,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct CreateUserBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::User,
|
||||
}
|
||||
|
||||
@ -2237,7 +2210,6 @@ fn create_user_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// CreateUser - POST /v2/user
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn create_user<I, A>(
|
||||
@ -2293,7 +2265,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct CreateUsersWithArrayInputBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a Vec<models::User>,
|
||||
}
|
||||
|
||||
@ -2306,7 +2278,6 @@ fn create_users_with_array_input_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// CreateUsersWithArrayInput - POST /v2/user/createWithArray
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn create_users_with_array_input<I, A>(
|
||||
@ -2363,7 +2334,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct CreateUsersWithListInputBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a Vec<models::User>,
|
||||
}
|
||||
|
||||
@ -2376,7 +2347,6 @@ fn create_users_with_list_input_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// CreateUsersWithListInput - POST /v2/user/createWithList
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn create_users_with_list_input<I, A>(
|
||||
@ -2438,7 +2408,6 @@ fn delete_user_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// DeleteUser - DELETE /v2/user/{username}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn delete_user<I, A>(
|
||||
@ -2503,7 +2472,6 @@ fn get_user_by_name_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// GetUserByName - GET /v2/user/{username}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_user_by_name<I, A>(
|
||||
@ -2584,7 +2552,6 @@ fn login_user_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// LoginUser - GET /v2/user/login
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn login_user<I, A>(
|
||||
@ -2636,8 +2603,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("x-rate-limit"), x_rate_limit);
|
||||
response_headers.insert(HeaderName::from_static(""), x_rate_limit);
|
||||
}
|
||||
}
|
||||
if let Some(x_expires_after) = x_expires_after {
|
||||
@ -2653,8 +2619,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("x-expires-after"), x_expires_after);
|
||||
response_headers.insert(HeaderName::from_static(""), x_expires_after);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2695,7 +2660,6 @@ where
|
||||
fn logout_user_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// LogoutUser - GET /v2/user/logout
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn logout_user<I, A>(
|
||||
@ -2747,7 +2711,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct UpdateUserBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::User,
|
||||
}
|
||||
|
||||
@ -2762,7 +2726,6 @@ fn update_user_validation(
|
||||
|
||||
Ok((path_params, body))
|
||||
}
|
||||
|
||||
/// UpdateUser - PUT /v2/user/{username}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn update_user<I, A>(
|
||||
|
@ -1 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
7.5.0-SNAPSHOT
|
||||
|
@ -21,7 +21,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -41,7 +41,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -12,7 +12,7 @@ server, you can easily generate a server stub.
|
||||
To see how to make this your own, look here: [README]((https://openapi-generator.tech))
|
||||
|
||||
- API version: 1.0.0
|
||||
|
||||
- Generator version: 7.5.0-SNAPSHOT
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_imports,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -92,7 +92,9 @@ pub struct GetUserByNamePathParams {
|
||||
pub struct LoginUserQueryParams {
|
||||
/// The user name for login
|
||||
#[serde(rename = "username")]
|
||||
#[validate(regex = "RE_LOGINUSERQUERYPARAMS_USERNAME")]
|
||||
#[validate(
|
||||
regex(path = *RE_LOGINUSERQUERYPARAMS_USERNAME),
|
||||
)]
|
||||
pub username: String,
|
||||
/// The password for login in clear text
|
||||
#[serde(rename = "password")]
|
||||
@ -287,7 +289,9 @@ pub struct Category {
|
||||
pub id: Option<i64>,
|
||||
|
||||
#[serde(rename = "name")]
|
||||
#[validate(regex = "RE_CATEGORY_NAME")]
|
||||
#[validate(
|
||||
regex(path = *RE_CATEGORY_NAME),
|
||||
)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct AddPetBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Pet,
|
||||
}
|
||||
|
||||
@ -79,7 +79,6 @@ fn add_pet_validation(body: models::Pet) -> std::result::Result<(models::Pet,),
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// AddPet - POST /v2/pet
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn add_pet<I, A>(
|
||||
@ -158,7 +157,6 @@ fn delete_pet_validation(
|
||||
|
||||
Ok((header_params, path_params))
|
||||
}
|
||||
|
||||
/// DeletePet - DELETE /v2/pet/{petId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn delete_pet<I, A>(
|
||||
@ -246,7 +244,6 @@ fn find_pets_by_status_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// FindPetsByStatus - GET /v2/pet/findByStatus
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn find_pets_by_status<I, A>(
|
||||
@ -324,7 +321,6 @@ fn find_pets_by_tags_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// FindPetsByTags - GET /v2/pet/findByTags
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn find_pets_by_tags<I, A>(
|
||||
@ -402,7 +398,6 @@ fn get_pet_by_id_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// GetPetById - GET /v2/pet/{petId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_pet_by_id<I, A>(
|
||||
@ -478,7 +473,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct UpdatePetBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Pet,
|
||||
}
|
||||
|
||||
@ -491,7 +486,6 @@ fn update_pet_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// UpdatePet - PUT /v2/pet
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn update_pet<I, A>(
|
||||
@ -576,7 +570,6 @@ fn update_pet_with_form_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// UpdatePetWithForm - POST /v2/pet/{petId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn update_pet_with_form<I, A>(
|
||||
@ -638,7 +631,6 @@ fn upload_file_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// UploadFile - POST /v2/pet/{petId}/uploadImage
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn upload_file<I, A>(
|
||||
@ -719,7 +711,6 @@ fn delete_order_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// DeleteOrder - DELETE /v2/store/order/{orderId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn delete_order<I, A>(
|
||||
@ -780,7 +771,6 @@ where
|
||||
fn get_inventory_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// GetInventory - GET /v2/store/inventory
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_inventory<I, A>(
|
||||
@ -856,7 +846,6 @@ fn get_order_by_id_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// GetOrderById - GET /v2/store/order/{orderId}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_order_by_id<I, A>(
|
||||
@ -932,7 +921,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct PlaceOrderBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::Order,
|
||||
}
|
||||
|
||||
@ -945,7 +934,6 @@ fn place_order_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// PlaceOrder - POST /v2/store/order
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn place_order<I, A>(
|
||||
@ -1017,7 +1005,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct CreateUserBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::User,
|
||||
}
|
||||
|
||||
@ -1030,7 +1018,6 @@ fn create_user_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// CreateUser - POST /v2/user
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn create_user<I, A>(
|
||||
@ -1086,7 +1073,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct CreateUsersWithArrayInputBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a Vec<models::User>,
|
||||
}
|
||||
|
||||
@ -1099,7 +1086,6 @@ fn create_users_with_array_input_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// CreateUsersWithArrayInput - POST /v2/user/createWithArray
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn create_users_with_array_input<I, A>(
|
||||
@ -1156,7 +1142,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct CreateUsersWithListInputBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a Vec<models::User>,
|
||||
}
|
||||
|
||||
@ -1169,7 +1155,6 @@ fn create_users_with_list_input_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// CreateUsersWithListInput - POST /v2/user/createWithList
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn create_users_with_list_input<I, A>(
|
||||
@ -1231,7 +1216,6 @@ fn delete_user_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// DeleteUser - DELETE /v2/user/{username}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn delete_user<I, A>(
|
||||
@ -1296,7 +1280,6 @@ fn get_user_by_name_validation(
|
||||
|
||||
Ok((path_params,))
|
||||
}
|
||||
|
||||
/// GetUserByName - GET /v2/user/{username}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_user_by_name<I, A>(
|
||||
@ -1377,7 +1360,6 @@ fn login_user_validation(
|
||||
|
||||
Ok((query_params,))
|
||||
}
|
||||
|
||||
/// LoginUser - GET /v2/user/login
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn login_user<I, A>(
|
||||
@ -1430,7 +1412,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers.insert(HeaderName::from_static("set-cookie"), set_cookie);
|
||||
response_headers.insert(HeaderName::from_static(""), set_cookie);
|
||||
}
|
||||
}
|
||||
if let Some(x_rate_limit) = x_rate_limit {
|
||||
@ -1445,8 +1427,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("x-rate-limit"), x_rate_limit);
|
||||
response_headers.insert(HeaderName::from_static(""), x_rate_limit);
|
||||
}
|
||||
}
|
||||
if let Some(x_expires_after) = x_expires_after {
|
||||
@ -1462,8 +1443,7 @@ where
|
||||
|
||||
{
|
||||
let mut response_headers = response.headers_mut().unwrap();
|
||||
response_headers
|
||||
.insert(HeaderName::from_static("x-expires-after"), x_expires_after);
|
||||
response_headers.insert(HeaderName::from_static(""), x_expires_after);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1504,7 +1484,6 @@ where
|
||||
fn logout_user_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// LogoutUser - GET /v2/user/logout
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn logout_user<I, A>(
|
||||
@ -1556,7 +1535,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct UpdateUserBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::User,
|
||||
}
|
||||
|
||||
@ -1571,7 +1550,6 @@ fn update_user_validation(
|
||||
|
||||
Ok((path_params, body))
|
||||
}
|
||||
|
||||
/// UpdateUser - PUT /v2/user/{username}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn update_user<I, A>(
|
||||
|
@ -1 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
7.5.0-SNAPSHOT
|
||||
|
@ -20,7 +20,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -12,7 +12,7 @@ server, you can easily generate a server stub.
|
||||
To see how to make this your own, look here: [README]((https://openapi-generator.tech))
|
||||
|
||||
- API version: 1.0
|
||||
|
||||
- Generator version: 7.5.0-SNAPSHOT
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_imports,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -30,7 +30,6 @@ where
|
||||
fn ping_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// PingGet - GET /ping
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn ping_get<I, A>(
|
||||
|
@ -1 +1 @@
|
||||
7.4.0-SNAPSHOT
|
||||
7.5.0-SNAPSHOT
|
||||
|
@ -20,7 +20,7 @@ conversion = [
|
||||
async-trait = "0.1"
|
||||
axum = { version = "0.7" }
|
||||
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
|
||||
base64 = "0.21"
|
||||
base64 = "0.22"
|
||||
bytes = "1"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
frunk = { version = "0.4", optional = true }
|
||||
@ -40,7 +40,7 @@ tokio = { version = "1", default-features = false, features = [
|
||||
] }
|
||||
tracing = { version = "0.1", features = ["attributes"] }
|
||||
uuid = { version = "1", features = ["serde"] }
|
||||
validator = { version = "0.16", features = ["derive"] }
|
||||
validator = { version = "0.18", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = "0.3"
|
||||
|
@ -12,7 +12,7 @@ server, you can easily generate a server stub.
|
||||
To see how to make this your own, look here: [README]((https://openapi-generator.tech))
|
||||
|
||||
- API version: 2.3.4
|
||||
|
||||
- Generator version: 7.5.0-SNAPSHOT
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
trivial_casts,
|
||||
unused_variables,
|
||||
unused_mut,
|
||||
unused_imports,
|
||||
unused_extern_crates,
|
||||
non_camel_case_types
|
||||
non_camel_case_types,
|
||||
unused_imports,
|
||||
unused_attributes
|
||||
)]
|
||||
#![allow(unused_imports, unused_attributes)]
|
||||
#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
@ -41,7 +41,6 @@ where
|
||||
fn all_of_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// AllOfGet - GET /allOf
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn all_of_get<I, A>(
|
||||
@ -113,7 +112,6 @@ where
|
||||
fn dummy_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// DummyGet - GET /dummy
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn dummy_get<I, A>(
|
||||
@ -165,7 +163,7 @@ where
|
||||
#[derive(validator::Validate)]
|
||||
#[allow(dead_code)]
|
||||
struct DummyPutBodyValidator<'a> {
|
||||
#[validate]
|
||||
#[validate(nested)]
|
||||
body: &'a models::DummyPutRequest,
|
||||
}
|
||||
|
||||
@ -178,7 +176,6 @@ fn dummy_put_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// DummyPut - PUT /dummy
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn dummy_put<I, A>(
|
||||
@ -235,7 +232,6 @@ where
|
||||
fn file_response_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// FileResponseGet - GET /file_response
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn file_response_get<I, A>(
|
||||
@ -310,7 +306,6 @@ where
|
||||
fn get_structured_yaml_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// GetStructuredYaml - GET /get-structured-yaml
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn get_structured_yaml<I, A>(
|
||||
@ -384,7 +379,6 @@ struct HtmlPostBodyValidator<'a> {
|
||||
fn html_post_validation(body: String) -> std::result::Result<(String,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// HtmlPost - POST /html
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn html_post<I, A>(
|
||||
@ -459,7 +453,6 @@ struct PostYamlBodyValidator<'a> {
|
||||
fn post_yaml_validation(body: String) -> std::result::Result<(String,), ValidationErrors> {
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// PostYaml - POST /post-yaml
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn post_yaml<I, A>(
|
||||
@ -516,7 +509,6 @@ where
|
||||
fn raw_json_get_validation() -> std::result::Result<(), ValidationErrors> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// RawJsonGet - GET /raw_json
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn raw_json_get<I, A>(
|
||||
@ -599,7 +591,6 @@ fn solo_object_post_validation(
|
||||
|
||||
Ok((body,))
|
||||
}
|
||||
|
||||
/// SoloObjectPost - POST /solo-object
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn solo_object_post<I, A>(
|
||||
|
Loading…
x
Reference in New Issue
Block a user