File tree Expand file tree Collapse file tree 3 files changed +108
-0
lines changed
springdoc-openapi-webmvc-core/src/test
java/test/org/springdoc/api/app151 Expand file tree Collapse file tree 3 files changed +108
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ *
3
+ * * Copyright 2019-2020 the original author or authors.
4
+ * *
5
+ * * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * * you may not use this file except in compliance with the License.
7
+ * * You may obtain a copy of the License at
8
+ * *
9
+ * * https://www.apache.org/licenses/LICENSE-2.0
10
+ * *
11
+ * * Unless required by applicable law or agreed to in writing, software
12
+ * * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * * See the License for the specific language governing permissions and
15
+ * * limitations under the License.
16
+ *
17
+ */
18
+
19
+ package test .org .springdoc .api .app151 ;
20
+
21
+ import org .springframework .web .bind .annotation .GetMapping ;
22
+ import org .springframework .web .bind .annotation .RequestMapping ;
23
+ import org .springframework .web .bind .annotation .RestController ;
24
+
25
+ @ RestController
26
+ @ RequestMapping ("/test" )
27
+ public class HelloController {
28
+
29
+ @ GetMapping ("" )
30
+ /**
31
+ * A test endpoint mounted under `/test`
32
+ * @return 0
33
+ */
34
+ public int test () {
35
+ return 0 ;
36
+ }
37
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ *
3
+ * * Copyright 2019-2020 the original author or authors.
4
+ * *
5
+ * * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * * you may not use this file except in compliance with the License.
7
+ * * You may obtain a copy of the License at
8
+ * *
9
+ * * https://www.apache.org/licenses/LICENSE-2.0
10
+ * *
11
+ * * Unless required by applicable law or agreed to in writing, software
12
+ * * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * * See the License for the specific language governing permissions and
15
+ * * limitations under the License.
16
+ *
17
+ */
18
+
19
+ package test .org .springdoc .api .app151 ;
20
+
21
+
22
+ import test .org .springdoc .api .AbstractSpringDocTest ;
23
+
24
+ import org .springframework .boot .autoconfigure .SpringBootApplication ;
25
+
26
+ /**
27
+ * Tests Spring meta-annotations as method parameters
28
+ */
29
+ public class SpringDocApp151Test extends AbstractSpringDocTest {
30
+
31
+ @ SpringBootApplication
32
+ static class SpringDocTestApp {}
33
+
34
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "openapi" : " 3.0.1" ,
3
+ "info" : {
4
+ "title" : " OpenAPI definition" ,
5
+ "version" : " v0"
6
+ },
7
+ "servers" : [
8
+ {
9
+ "url" : " http://localhost" ,
10
+ "description" : " Generated server url"
11
+ }
12
+ ],
13
+ "paths" : {
14
+ "/test" : {
15
+ "get" : {
16
+ "tags" : [
17
+ " hello-controller"
18
+ ],
19
+ "operationId" : " test" ,
20
+ "responses" : {
21
+ "200" : {
22
+ "description" : " OK" ,
23
+ "content" : {
24
+ "*/*" : {
25
+ "schema" : {
26
+ "type" : " integer" ,
27
+ "format" : " int32"
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "components" : {}
37
+ }
You can’t perform that action at this time.
0 commit comments