@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.
Files changed (2) hide show
  1. package/README.md +6 -5
  2. 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 400 declared with a schema that does
587
- not describe what the server sends, such as the validation body of
588
- `@nxgt/openapi-hono`, `{ status, message, timestamp, issues }`, throws a
589
- `ValidationError` instead of returning the 400. Declare the body the server
590
- sends, or pass `decode: false` and `validate: { response: false }`.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/openapi-httpyz",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",