Skip to content

Commit 92f972e

Browse files
committed
Update README.md
1 parent 26023dc commit 92f972e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

problem4j-spring-web/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
6. [General HTTP Stuff](#general-http-stuff)
1111

1212
## Overview
13+
1314
This module overrides Spring Web's default (often minimal or plain-text) responses for many framework exceptions and
1415
produces structured RFC 7807 `Problem` objects. [`ExceptionMappingConfiguration`][ExceptionMappingConfiguration]
1516
registers these mappings.
@@ -77,7 +78,7 @@ To extract values from target exception, it's possible to use placeholders for i
7778

7879
```java
7980
/**
80-
* <pre>{@code
81+
* <pre>{@code
8182
* {
8283
* "type": "https://example.com/errors/invalid-request",
8384
* "title": "Invalid Request",
@@ -137,7 +138,9 @@ property `spring.validation.method.adapt-constraint-violations` to `true`. Enabl
137138
not rely on raw `ConstraintViolationException`, but rather on `MethodValidationException`, which contains more details
138139
about validated element.
139140

140-
Let's say we have following `@RestController`, where `idx` query param has different Java parameter name.
141+
Let's say we have following `@RestController`, where `customerId` query param has different Java parameter name (its
142+
`String customerIdParam`). We would like to have `customerId` in our response body as potential API clients do not have
143+
knowledge about internal technologies used by backend.
141144

142145
```java
143146
@Validated
@@ -250,7 +253,7 @@ Example:
250253
}
251254
```
252255
5. If passing request that's too large by configuration, service will write following response. Note that reason phrase
253-
for `413` was changed into `Content Too Large` in [RFC 9110 §15.5.14][rfc9110-15.5.4].
256+
for `413` was changed into `Content Too Large` in [RFC 9110 §15.5.14][rfc9110-15.5.4].
254257
```json
255258
{
256259
"status": 413,

0 commit comments

Comments
 (0)