Skip to content

Commit

Permalink
Merge pull request #19 from team-dodn/dependency-8-19-24
Browse files Browse the repository at this point in the history
[DEPENDENCY] Update dependencies
  • Loading branch information
geminiKim authored Aug 19, 2024
2 parents f4ea6fd + c7aaafb commit 90fef4d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,61 +43,33 @@ public void exampleGet() {
when(exampleService.processExample(any())).thenReturn(new ExampleResult("BYE"));

given().contentType(ContentType.JSON)
.queryParam("exampleParam", "HELLO_PARAM")
.get("/get/{exampleValue}", "HELLO_PATH")
.then()
.status(HttpStatus.OK)
.apply(
document(
"exampleGet",
requestPreprocessor(),
responsePreprocessor(),
pathParameters(
parameterWithName("exampleValue")
.description("ExampleValue")),
queryParameters(
parameterWithName("exampleParam")
.description("ExampleParam")),
responseFields(
fieldWithPath("result")
.type(JsonFieldType.STRING)
.description("ResultType"),
fieldWithPath("data.result")
.type(JsonFieldType.STRING)
.description("Result Date"),
fieldWithPath("error")
.type(JsonFieldType.NULL)
.ignored())));
.queryParam("exampleParam", "HELLO_PARAM")
.get("/get/{exampleValue}", "HELLO_PATH")
.then()
.status(HttpStatus.OK)
.apply(document("exampleGet", requestPreprocessor(), responsePreprocessor(),
pathParameters(parameterWithName("exampleValue").description("ExampleValue")),
queryParameters(parameterWithName("exampleParam").description("ExampleParam")),
responseFields(fieldWithPath("result").type(JsonFieldType.STRING).description("ResultType"),
fieldWithPath("data.result").type(JsonFieldType.STRING).description("Result Date"),
fieldWithPath("error").type(JsonFieldType.NULL).ignored())));
}

@Test
public void examplePost() {
when(exampleService.processExample(any())).thenReturn(new ExampleResult("BYE"));

given().contentType(ContentType.JSON)
.body(new ExampleRequestDto("HELLO_BODY"))
.post("/post")
.then()
.status(HttpStatus.OK)
.apply(
document(
"examplePost",
requestPreprocessor(),
responsePreprocessor(),
requestFields(
fieldWithPath("data")
.type(JsonFieldType.STRING)
.description("ExampleBody Data Field")),
responseFields(
fieldWithPath("result")
.type(JsonFieldType.STRING)
.description("ResultType"),
fieldWithPath("data.result")
.type(JsonFieldType.STRING)
.description("Result Date"),
fieldWithPath("error")
.type(JsonFieldType.STRING)
.ignored())));
.body(new ExampleRequestDto("HELLO_BODY"))
.post("/post")
.then()
.status(HttpStatus.OK)
.apply(document("examplePost", requestPreprocessor(), responsePreprocessor(),
requestFields(
fieldWithPath("data").type(JsonFieldType.STRING).description("ExampleBody Data Field")),
responseFields(fieldWithPath("result").type(JsonFieldType.STRING).description("ResultType"),
fieldWithPath("data.result").type(JsonFieldType.STRING).description("Result Date"),
fieldWithPath("error").type(JsonFieldType.STRING).ignored())));
}

}
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ javaVersion=21

### Plugin depdency versions ###
asciidoctorConvertVersion=3.3.2
springJavaFormatVersion=0.0.41
springJavaFormatVersion=0.0.43

### Spring dependency versions ###
springBootVersion=3.3.0
springDependencyManagementVersion=1.1.5
springCloudDependenciesVersion=2023.0.1
springBootVersion=3.3.2
springDependencyManagementVersion=1.1.6
springCloudDependenciesVersion=2023.0.3

### External dependency versions ###
sentryVersion=7.9.0
sentryVersion=7.14.0

0 comments on commit 90fef4d

Please sign in to comment.