@rvoh/psychic 1.6.0 → 1.6.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 1.6.1
|
|
2
|
+
|
|
3
|
+
- fix issue preventing validation fallbacks from properly overriding on OpenAPI decorator calls when explicitly opting out of validation
|
|
4
|
+
|
|
1
5
|
## 1.6.0
|
|
2
6
|
|
|
3
7
|
enables validation to be added to both openapi configurations, as well as to `OpenAPI` decorator calls, enabling the developer to granularly control validation logic for their endpoints.
|
|
@@ -141,9 +141,11 @@ class OpenapiEndpointRenderer {
|
|
|
141
141
|
*/
|
|
142
142
|
shouldValidateOpenapiPayload(openapiName, target) {
|
|
143
143
|
const psychicApp = index_js_1.default.getOrFail();
|
|
144
|
-
|
|
145
|
-
this.validate?.
|
|
146
|
-
|
|
144
|
+
if (this.validate?.all !== undefined)
|
|
145
|
+
return this.validate?.all;
|
|
146
|
+
if (this.validate?.[target] !== undefined)
|
|
147
|
+
return this.validate?.[target];
|
|
148
|
+
return psychicApp.openapiValidationIsActive(openapiName, target);
|
|
147
149
|
}
|
|
148
150
|
/**
|
|
149
151
|
* @internal
|
|
@@ -135,9 +135,11 @@ export default class OpenapiEndpointRenderer {
|
|
|
135
135
|
*/
|
|
136
136
|
shouldValidateOpenapiPayload(openapiName, target) {
|
|
137
137
|
const psychicApp = PsychicApp.getOrFail();
|
|
138
|
-
|
|
139
|
-
this.validate?.
|
|
140
|
-
|
|
138
|
+
if (this.validate?.all !== undefined)
|
|
139
|
+
return this.validate?.all;
|
|
140
|
+
if (this.validate?.[target] !== undefined)
|
|
141
|
+
return this.validate?.[target];
|
|
142
|
+
return psychicApp.openapiValidationIsActive(openapiName, target);
|
|
141
143
|
}
|
|
142
144
|
/**
|
|
143
145
|
* @internal
|