-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
312 bug duplicate name object result in incorrect code generation #329
312 bug duplicate name object result in incorrect code generation #329
Conversation
…e-object-result-in-incorrect-code-generation
…sult-in-incorrect-code-generation' into 312-bug-duplicate-name-object-result-in-incorrect-code-generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for collaborating with the project to help us improve!
@@ -64,17 +64,17 @@ public static String getSimpleType(final JsonNode schema, final String prefix, f | |||
type = formatTypeOfString(format, useTimeType); | |||
} else if (NUMBER.equalsIgnoreCase(type)) { | |||
if (FLOAT.equalsIgnoreCase(format)) { | |||
type = StringUtils.capitalize(FLOAT); | |||
type = FLOAT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -80,7 +78,7 @@ private JsonNode solveRef(final FileLocation ymlParent, final String[] path, fin | |||
final String filePath = pathToFile[0]; | |||
JsonNode returnNode = null; | |||
|
|||
if (filePath.endsWith(YML) || filePath.endsWith(JSON) || filePath.endsWith(YAML)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -1,6 +1,6 @@ | |||
<#assign words = ["abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "default", "double", "do", "else", "enum", "extends", "false", "final", "finally", "float", "for", "goto", "if", "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "void", "volatile", "while"]> | |||
<#function calculateSafeName propertyName ender> | |||
<#if words?seq_contains(propertyName?uncap_first) || propertyName?matches("[0-9].*")> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -130,7 +130,6 @@ private static List<OperationObject> mapOperationObject(final SpecFile specFile, | |||
private static OperationObject createOperation( | |||
final JsonNode operation, final String operationType, final SpecFile specFile, final GlobalObject globalObject, | |||
final List<String> operationIdList, final Path baseDir) { | |||
Objects.requireNonNull(operation.get("tags"), "Tags element is required"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -182,11 +182,7 @@ public class ${schema.className} { | |||
private ${requireFinal (field)}${field.baseName?cap_first} ${calculateSafeName (field.baseName, hasConstValue(field.constValue))} | |||
public enum ${field.baseName?cap_first} { | |||
<#list field.enumValues as value> | |||
<#if value?matches("[0-9].*")> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -125,11 +125,7 @@ public class ${schema.className} { | |||
|
|||
public enum ${field.baseName?cap_first} { | |||
<#list field.enumValues as key, value> | |||
<#if key?matches("[0-9].*")> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
} | ||
|
||
@ParameterizedTest(name = "Test {index} - Process File Spec for case {0}") | ||
@MethodSource("fileSpecToProcess") | ||
void processFileSpecForTestFileGeneration(final String type, final List<SpecFile> specFileList, final Function<Path, Boolean> validation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -22,29 +21,6 @@ public class UserSignedUpPayload { | |||
@JsonProperty(value ="createdAt") | |||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss") | |||
private LocalDateTime createdAt; | |||
@JsonProperty(value ="numberEnum") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -40,12 +40,6 @@ components: | |||
createdAt: | |||
type: string | |||
format: date-time | |||
numberEnum: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
@@ -41,7 +41,7 @@ public class DataDTO { | |||
@MinItems(minimum = 5) | |||
@UniqueItems | |||
@NotNull | |||
private final List<Integer> test = new ArrayList<Integer>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback these changes please.
This pull request hasn't been labeled as |
Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications |
Project version has not been updated in build.gradle. Please, update your version using https://semver.org specifications |
1 similar comment
Project version has not been updated in build.gradle. Please, update your version using https://semver.org specifications |
Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications |
…rrect-code-generation
Fixed the storage of generated DTOS references when are in different packages.