Skip to content

Commit 8d6210b

Browse files
committed
Added status 422 Unprocessable Entity
1 parent ad591ac commit 8d6210b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

generated-docs/md/Apiary.Status.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ conflict :: Status
139139
_conflict :: SProxy "conflict"
140140
```
141141

142+
#### `unprocessableEntity`
143+
144+
``` purescript
145+
unprocessableEntity :: Status
146+
```
147+
148+
#### `_unprocessableEntity`
149+
150+
``` purescript
151+
_unprocessableEntity :: SProxy "unprocessableEntity"
152+
```
153+
142154
#### `maintenanceInProgress`
143155

144156
``` purescript
@@ -169,6 +181,7 @@ ResponseStatus "unauthorized"
169181
ResponseStatus "forbidden"
170182
ResponseStatus "notFound"
171183
ResponseStatus "conflict"
184+
ResponseStatus "unprocessableEntity"
172185
(Fail (Beside (Text "Unsupported response status: ") (Text status))) => ResponseStatus status
173186
```
174187

src/Apiary/Status.purs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ conflict = status 409 "Conflict"
6868

6969
_conflict = SProxy :: SProxy "conflict"
7070

71+
unprocessableEntity :: Status
72+
unprocessableEntity = status 422 "Unprocessable Entity"
73+
74+
_unprocessableEntity = SProxy :: SProxy "unprocessableEntity"
75+
7176
maintenanceInProgress :: Status
7277
maintenanceInProgress = status 520 "Maintenance In Progress"
7378

@@ -94,6 +99,8 @@ else instance responseStatusNotFound :: ResponseStatus "notFound" where
9499
toStatus _ = notFound
95100
else instance responseStatusConflict :: ResponseStatus "conflict" where
96101
toStatus _ = conflict
102+
else instance responseStatusUnprocessableEntity :: ResponseStatus "unprocessableEntity" where
103+
toStatus _ = unprocessableEntity
97104
else instance responseStatusFail ::
98105
Fail (Beside (Text "Unsupported response status: ") (Text status)) =>
99106
ResponseStatus status where

0 commit comments

Comments
 (0)