Add missing @PathVariable declarations in examples

Closes gh-25006
This commit is contained in:
swapy 2020-05-03 11:31:19 +05:30 committed by Sam Brannen
parent 6659e96104
commit 9288067ea8
1 changed files with 2 additions and 2 deletions

View File

@ -1634,7 +1634,7 @@ extracts the name, version, and file extension:
.Java
----
@GetMapping("/{name:[a-z-]+}-{version:\\d\\.\\d\\.\\d}{ext:\\.[a-z]+}")
public void handle(@PathVariable String version, @PathVariable String ext) {
public void handle(@PathVariable String name, @PathVariable String version, @PathVariable String ext) {
// ...
}
----
@ -1642,7 +1642,7 @@ extracts the name, version, and file extension:
.Kotlin
----
@GetMapping("/{name:[a-z-]+}-{version:\\d\\.\\d\\.\\d}{ext:\\.[a-z]+}")
fun handle(@PathVariable version: String, @PathVariable ext: String) {
fun handle(@PathVariable name: String, @PathVariable version: String, @PathVariable ext: String) {
// ...
}
----