Skip to content

Commit 3a16813

Browse files
committed
Fix PathVariable reference documentation code snippets
Closes gh-30258
1 parent a93382d commit 3a16813

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/docs/asciidoc/web/webflux.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ content types that a controller method produces, as the following example shows:
16251625
----
16261626
@GetMapping("/pets/{petId}", produces = ["application/json"])
16271627
@ResponseBody
1628-
fun getPet(@PathVariable String petId): Pet {
1628+
fun getPet(@PathVariable petId: String): Pet {
16291629
// ...
16301630
}
16311631
----
@@ -1674,7 +1674,7 @@ You can also use the same with request header conditions, as the following examp
16741674
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
16751675
.Java
16761676
----
1677-
@GetMapping(path = "/pets", headers = "myHeader=myValue") // <1>
1677+
@GetMapping(path = "/pets/{petId}", headers = "myHeader=myValue") // <1>
16781678
public void findPet(@PathVariable String petId) {
16791679
// ...
16801680
}
@@ -1684,7 +1684,7 @@ You can also use the same with request header conditions, as the following examp
16841684
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
16851685
.Kotlin
16861686
----
1687-
@GetMapping("/pets", headers = ["myHeader=myValue"]) // <1>
1687+
@GetMapping("/pets/{petId}", headers = ["myHeader=myValue"]) // <1>
16881688
fun findPet(@PathVariable petId: String) {
16891689
// ...
16901690
}

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,7 @@ You can also use the same with request header conditions, as the following examp
19111911
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
19121912
.Java
19131913
----
1914-
@GetMapping(path = "/pets", headers = "myHeader=myValue") // <1>
1914+
@GetMapping(path = "/pets/{petId}", headers = "myHeader=myValue") // <1>
19151915
public void findPet(@PathVariable String petId) {
19161916
// ...
19171917
}
@@ -1921,7 +1921,7 @@ You can also use the same with request header conditions, as the following examp
19211921
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
19221922
.Kotlin
19231923
----
1924-
@GetMapping("/pets", headers = ["myHeader=myValue"]) // <1>
1924+
@GetMapping("/pets/{petId}", headers = ["myHeader=myValue"]) // <1>
19251925
fun findPet(@PathVariable petId: String) {
19261926
// ...
19271927
}

0 commit comments

Comments
 (0)