@ng-openapi/http-resource 0.0.9 → 0.0.11-pr-18-feature-schema-validation-18c9be1.0
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/index.cjs +5 -0
- package/index.d.ts +4 -0
- package/index.js +5 -0
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -118,6 +118,7 @@ __name(escapeString, "escapeString");
|
|
|
118
118
|
// ../../shared/src/utils/functions/collect-used-types.ts
|
|
119
119
|
function collectUsedTypes(operations) {
|
|
120
120
|
const usedTypes = /* @__PURE__ */ new Set();
|
|
121
|
+
usedTypes.add("RequestOptions");
|
|
121
122
|
operations.forEach((operation) => {
|
|
122
123
|
operation.parameters?.forEach((param) => {
|
|
123
124
|
collectTypesFromSchema(param.schema || param, usedTypes);
|
|
@@ -3568,6 +3569,10 @@ var HttpResourceMethodGenerator = class {
|
|
|
3568
3569
|
...optionParams
|
|
3569
3570
|
],
|
|
3570
3571
|
returnType: `HttpResourceRef<${this.#responseType}>`
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
parameters: methodParams,
|
|
3575
|
+
returnType: `HttpResourceRef<${this.#responseType} | undefined>`
|
|
3571
3576
|
}
|
|
3572
3577
|
];
|
|
3573
3578
|
}
|
package/index.d.ts
CHANGED
|
@@ -117,6 +117,10 @@ interface GeneratorConfig {
|
|
|
117
117
|
options: {
|
|
118
118
|
dateType: "string" | "Date";
|
|
119
119
|
enumStyle: "enum" | "union";
|
|
120
|
+
validation?: {
|
|
121
|
+
response?: boolean;
|
|
122
|
+
request?: boolean;
|
|
123
|
+
};
|
|
120
124
|
generateServices?: boolean;
|
|
121
125
|
generateEnumBasedOnDescription?: boolean;
|
|
122
126
|
customHeaders?: Record<string, string>;
|
package/index.js
CHANGED
|
@@ -84,6 +84,7 @@ __name(escapeString, "escapeString");
|
|
|
84
84
|
// ../../shared/src/utils/functions/collect-used-types.ts
|
|
85
85
|
function collectUsedTypes(operations) {
|
|
86
86
|
const usedTypes = /* @__PURE__ */ new Set();
|
|
87
|
+
usedTypes.add("RequestOptions");
|
|
87
88
|
operations.forEach((operation) => {
|
|
88
89
|
operation.parameters?.forEach((param) => {
|
|
89
90
|
collectTypesFromSchema(param.schema || param, usedTypes);
|
|
@@ -3534,6 +3535,10 @@ var HttpResourceMethodGenerator = class {
|
|
|
3534
3535
|
...optionParams
|
|
3535
3536
|
],
|
|
3536
3537
|
returnType: `HttpResourceRef<${this.#responseType}>`
|
|
3538
|
+
},
|
|
3539
|
+
{
|
|
3540
|
+
parameters: methodParams,
|
|
3541
|
+
returnType: `HttpResourceRef<${this.#responseType} | undefined>`
|
|
3537
3542
|
}
|
|
3538
3543
|
];
|
|
3539
3544
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-openapi/http-resource",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11-pr-18-feature-schema-validation-18c9be1.0",
|
|
4
4
|
"description": "HTTP Resource plugin for ng-openapi - Angular HTTP utilities with caching and state management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|