-
Notifications
You must be signed in to change notification settings - Fork 141
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
Issue/1175/oas 3 enhance validation and random object generation ts #1325
base: main
Are you sure you want to change the base?
Issue/1175/oas 3 enhance validation and random object generation ts #1325
Conversation
Co-authored-by: Timon Borter <[email protected]>
a4dd0f7
to
02f1675
Compare
@tschlat build is failing: https://github.com/citrusframework/citrus/actions/runs/13526843489/job/37799461107?pr=1325#step:6:42458.. something is missing. |
- Enhance random object generation - Enhance configuration options for OpenAPIActions - autofill - operation path Co-authored-by: Timon Borter <[email protected]>
02f1675
to
d5f0887
Compare
There was a dependency missing. Pipeline is green. Feel free to review. |
Any activities around this? So that we can move ahead? |
52/104 files. 27 comments so far 😉 |
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.
finally the long awaited review 😉 hope it's all right. let me know if you have any questions or if I got something wrong...
connectors/citrus-openapi/src/main/java/org/citrusframework/openapi/OpenApiMessageType.java
Show resolved
Hide resolved
connectors/citrus-openapi/src/main/java/org/citrusframework/openapi/OpenApiRepository.java
Show resolved
Hide resolved
connectors/citrus-openapi/src/main/java/org/citrusframework/openapi/OpenApiRepository.java
Show resolved
Hide resolved
} | ||
|
||
public static boolean isGenerateOptionalFieldsGlobally() { | ||
return parseBoolean(System.getProperty(GENERATE_OPTIONAL_FIELDS_PROPERTY, System.getenv(GENERATE_OPTIONAL_FIELDS_ENV) != null ? |
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.
the SystemProvider
makes this easily testable, but I think we've covered this discussion once before.
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.
that would also solve the build error.. #1325 (comment) 😉
connectors/citrus-openapi/src/main/java/org/citrusframework/openapi/OpenApiSettings.java
Show resolved
Hide resolved
Object value = entry.getValue(); | ||
|
||
if ("ARRAY".equals(key)) { | ||
appendObject(builder, value); |
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.
that is a bit irritating, because the method appendArray
does also exist.
public class RandomNumberGenerator extends RandomGenerator { | ||
|
||
public static final BigDecimal THOUSAND = new BigDecimal(1000); | ||
public static final BigDecimal HUNDRED = java.math.BigDecimal.valueOf(100); |
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.
public static final BigDecimal HUNDRED = java.math.BigDecimal.valueOf(100); | |
public static final BigDecimal HUNDRED = new BigDecimal(100); |
* @return a unique scenario id for the {@link OasOperation} | ||
*/ | ||
public static String createFullPathOperationIdentifier(OasOperation oasOperation, String path) { | ||
return createFullPathOperationIdentifier(oasOperation.getMethod().toUpperCase(), path); |
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.
return createFullPathOperationIdentifier(oasOperation.getMethod().toUpperCase(), path); | |
return createFullPathOperationIdentifier(oasOperation.getMethod(), path); |
.toUpperCase()
should be (and is being) done by the base-method.
@@ -0,0 +1,18 @@ | |||
package org.citrusframework.openapi; |
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.
this one is missing the copyright headers.
@@ -1,25 +1,23 @@ | |||
package org.citrusframework.openapi.actions; |
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.
some more tests with missing copyright headers. there's this function in Intellij, where you can apply copyright headers to all files matching a glob pattern (e.g. **/*.java
). maybe you should try it 😉 or I can do it, if you want me to.
Here's the third PR, introducing two main features:
Provided in two commits to separate these concerns.