-
Notifications
You must be signed in to change notification settings - Fork 46
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
open api scenario generator #315
base: main
Are you sure you want to change the base?
open api scenario generator #315
Conversation
@@ -37,6 +38,7 @@ | |||
* @author Christoph Deppisch | |||
*/ | |||
@Test | |||
@Ignore |
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 should be reverted
OpenApiServerResponseActionBuilder sendMessageBuilder = openApiServerActionBuilder.send( | ||
oasOperation.operationId, "200").enableRandomGeneration(false); | ||
sendMessageBuilder.message().body(format("{\"id\": %d, \"pingTime\": %d}", | ||
getIdFromPingRequest(receivedMessage), System.currentTimeMillis())); |
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.
getIdFromPingRequest(receivedMessage), System.currentTimeMillis())); | |
getIdFromPingRequest(receivedMessage), currentTimeMillis())); |
please use static import for this.
@Bean | ||
public HttpClient petstoreClientV3() { | ||
return CitrusEndpoints.http().client() | ||
.requestUrl(String.format("http://localhost:%s/petstore/api/v3", 8080)) |
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.
.requestUrl(String.format("http://localhost:%s/petstore/api/v3", 8080)) | |
.requestUrl(format("http://localhost:%s/petstore/api/v3", 8080)) |
.header("Ping-Time", "@isNumber()@") | ||
.validate(jsonPath() | ||
.expression("$.id", "5000") | ||
.expression("$.pingCount", "@greaterThan("+expectedPingLimit+")@")) |
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.
I think this file needs a ctrl
+alt
+ l
. there are some static imports that could be adjusted as well, e.g. MediaType
and HttpStatus
.
private List<HttpScenario> filterScenarios(Collection<SimulatorScenario> allScenarios) { | ||
return allScenarios.stream().filter(HttpScenario.class::isInstance) | ||
.map(HttpScenario.class::cast) | ||
.sorted(new HttpPathSpecificityComparator()) |
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.
couldn't this be a singleton? why is it stateful? I think the initialization per request could have performance impact. correct me if I am wrong!
c65e307
to
3bd51b8
Compare
requires citrusframework/citrus#1224