Skip to content

Commit 8367ba9

Browse files
author
jsieczczynski
committed
Add failing test case
1 parent e14f975 commit 8367ba9

File tree

3 files changed

+127
-0
lines changed

3 files changed

+127
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
*
3+
* *
4+
* * *
5+
* * * *
6+
* * * * * Copyright 2019-2022 the original author or authors.
7+
* * * * *
8+
* * * * * Licensed under the Apache License, Version 2.0 (the "License");
9+
* * * * * you may not use this file except in compliance with the License.
10+
* * * * * You may obtain a copy of the License at
11+
* * * * *
12+
* * * * * https://www.apache.org/licenses/LICENSE-2.0
13+
* * * * *
14+
* * * * * Unless required by applicable law or agreed to in writing, software
15+
* * * * * distributed under the License is distributed on an "AS IS" BASIS,
16+
* * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* * * * * See the License for the specific language governing permissions and
18+
* * * * * limitations under the License.
19+
* * * *
20+
* * *
21+
* *
22+
*
23+
*/
24+
25+
package test.org.springdoc.api.v30.app219;
26+
27+
import org.springframework.http.ResponseEntity;
28+
import org.springframework.web.bind.annotation.RequestBody;
29+
import org.springframework.web.bind.annotation.RequestMapping;
30+
import org.springframework.web.bind.annotation.RequestMethod;
31+
import org.springframework.web.bind.annotation.RestController;
32+
33+
@RestController
34+
@RequestMapping(value = "/api", produces = {"application/xml"}, consumes = {"application/json"})
35+
public class HelloController {
36+
37+
@RequestMapping(value = "/testpost", method = RequestMethod.POST, produces = {"application/json"},
38+
consumes = {"application/json;charset=UTF-8", "application/json; charset=UTF-8"})
39+
public ResponseEntity<TestObject> testpost(@RequestBody TestObject dto) {
40+
return ResponseEntity.ok(dto);
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
*
3+
* *
4+
* * *
5+
* * * *
6+
* * * * * Copyright 2019-2022 the original author or authors.
7+
* * * * *
8+
* * * * * Licensed under the Apache License, Version 2.0 (the "License");
9+
* * * * * you may not use this file except in compliance with the License.
10+
* * * * * You may obtain a copy of the License at
11+
* * * * *
12+
* * * * * https://www.apache.org/licenses/LICENSE-2.0
13+
* * * * *
14+
* * * * * Unless required by applicable law or agreed to in writing, software
15+
* * * * * distributed under the License is distributed on an "AS IS" BASIS,
16+
* * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* * * * * See the License for the specific language governing permissions and
18+
* * * * * limitations under the License.
19+
* * * *
20+
* * *
21+
* *
22+
*
23+
*/
24+
25+
package test.org.springdoc.api.v30.app219;
26+
27+
import org.springframework.boot.autoconfigure.SpringBootApplication;
28+
import org.springframework.test.context.ActiveProfiles;
29+
import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
30+
31+
@ActiveProfiles("219")
32+
public class SpringDocApp219Test extends AbstractSpringDocV30Test {
33+
34+
@SpringBootApplication
35+
static class SpringDocTestApp {}
36+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
*
3+
* *
4+
* * *
5+
* * * *
6+
* * * * * Copyright 2019-2022 the original author or authors.
7+
* * * * *
8+
* * * * * Licensed under the Apache License, Version 2.0 (the "License");
9+
* * * * * you may not use this file except in compliance with the License.
10+
* * * * * You may obtain a copy of the License at
11+
* * * * *
12+
* * * * * https://www.apache.org/licenses/LICENSE-2.0
13+
* * * * *
14+
* * * * * Unless required by applicable law or agreed to in writing, software
15+
* * * * * distributed under the License is distributed on an "AS IS" BASIS,
16+
* * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* * * * * See the License for the specific language governing permissions and
18+
* * * * * limitations under the License.
19+
* * * *
20+
* * *
21+
* *
22+
*
23+
*/
24+
25+
package test.org.springdoc.api.v30.app219;
26+
27+
import java.time.LocalDateTime;
28+
29+
public class TestObject {
30+
public String stringValue;
31+
32+
public LocalDateTime localDateTime;
33+
34+
public String getStringValue() {
35+
return stringValue;
36+
}
37+
38+
public void setStringValue(String stringValue) {
39+
this.stringValue = stringValue;
40+
}
41+
42+
public LocalDateTime getLocalDateTime() {
43+
return localDateTime;
44+
}
45+
46+
public void setLocalDateTime(LocalDateTime localDateTime) {
47+
this.localDateTime = localDateTime;
48+
}
49+
}

0 commit comments

Comments
 (0)