@nxgt/openapi-httpyz 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -583,11 +583,12 @@ A media type of a `RuntimeOperation`'s `body` or `responses`.
|
|
|
583
583
|
the spec does not declare are dropped, unless the spec was generated to
|
|
584
584
|
keep them, and a reply the spec refuses throws a `ValidationError`, even
|
|
585
585
|
with `validate: false`. `decode: false` takes the reply at its word.
|
|
586
|
-
- **An error reply is checked too.** A
|
|
587
|
-
|
|
588
|
-
`@nxgt/openapi-hono
|
|
589
|
-
|
|
590
|
-
|
|
586
|
+
- **An error reply is checked too.** A reply whose body the spec does not
|
|
587
|
+
describe throws a `ValidationError` instead of returning. The 400 that
|
|
588
|
+
`@nxgt/openapi-hono` answers a refused request with is declared by
|
|
589
|
+
`@nxgt/openapi-codegen`, as `ValidationErrorBody`, unless it ran with
|
|
590
|
+
`validationErrors: false`. Any other body the server sends, declare it, or
|
|
591
|
+
pass `decode: false` and `validate: { response: false }`.
|
|
591
592
|
- **With `decode: false`, a reply is typed as JSON carries it**: with
|
|
592
593
|
`dates: 'date'`, a date-time is a string.
|
|
593
594
|
- **A request is typed as JSON carries it, whatever `decode` says.** With
|