-
-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support of {*param} path patterns is broken in 1.6.15. Fixes #2188
- Loading branch information
1 parent
4d06552
commit 50b06ad
Showing
4 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app205/OrderDemo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package test.org.springdoc.api.v30.app205; | ||
|
||
/** | ||
* @author bnasslahsen | ||
*/ | ||
|
||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
|
||
public class OrderDemo { | ||
|
||
@RestController | ||
public static class MyController { | ||
|
||
@GetMapping("/test/{*param}") | ||
public String testingMethod(@PathVariable("param") String param) { | ||
return "foo"; | ||
} | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...napi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app205/SpringdocApp205Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package test.org.springdoc.api.v30.app205; | ||
|
||
/** | ||
* @author bnasslahsen | ||
*/ | ||
|
||
import test.org.springdoc.api.v30.AbstractSpringDocV30Test; | ||
|
||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.test.context.TestPropertySource; | ||
|
||
/** | ||
* Fix regression in #2031 | ||
*/ | ||
@TestPropertySource(properties = { "springdoc.group-configs[0].group=mygroup", "springdoc.group-configs[0].paths-to-match=/test" }) | ||
public class SpringdocApp205Test extends AbstractSpringDocV30Test { | ||
|
||
@SpringBootApplication | ||
static class SpringDocTestApp {} | ||
|
||
} |
46 changes: 46 additions & 0 deletions
46
springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app205.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "OpenAPI definition", | ||
"version": "v0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost", | ||
"description": "Generated server url" | ||
} | ||
], | ||
"paths": { | ||
"/test/{*param}": { | ||
"get": { | ||
"tags": [ | ||
"my-controller" | ||
], | ||
"operationId": "testingMethod", | ||
"parameters": [ | ||
{ | ||
"name": "param", | ||
"in": "path", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"content": { | ||
"*/*": { | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": {} | ||
} |