vovk 3.0.0-draft.373 → 3.0.0-draft.374

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.
@@ -138,13 +138,13 @@ function openAPIToVovkSchema({ apiRoot, source: { object: openAPIObject }, getMo
138
138
  }
139
139
  if (formDataBody) {
140
140
  Object.assign(formDataBody, {
141
- 'x-formData': true,
141
+ 'x-isForm': true,
142
142
  'x-tsType': 'FormData',
143
143
  });
144
144
  }
145
145
  if (urlEncodedBody) {
146
146
  Object.assign(urlEncodedBody, {
147
- 'x-formData': true,
147
+ 'x-isForm': true,
148
148
  'x-tsType': 'FormData',
149
149
  });
150
150
  }
@@ -100,7 +100,7 @@ function withValidationLibrary({ isForm, disableServerSideValidation, skipSchema
100
100
  };
101
101
  const resultHandlerEnhanced = Object.assign(resultHandler, { fn, models });
102
102
  if (toJSONSchema) {
103
- const getJsonSchema = (model, type) => Object.assign(toJSONSchema(model, { type }), type === 'body' && isForm ? { 'x-formData': isForm } : {});
103
+ const getJsonSchema = (model, type) => Object.assign(toJSONSchema(model, { type }), type === 'body' && isForm ? { 'x-isForm': isForm } : {});
104
104
  const validation = {};
105
105
  if (body && !skipSchemaEmissionKeys.includes('body')) {
106
106
  validation.body = getJsonSchema(body, 'body');
@@ -138,13 +138,13 @@ function openAPIToVovkSchema({ apiRoot, source: { object: openAPIObject }, getMo
138
138
  }
139
139
  if (formDataBody) {
140
140
  Object.assign(formDataBody, {
141
- 'x-formData': true,
141
+ 'x-isForm': true,
142
142
  'x-tsType': 'FormData',
143
143
  });
144
144
  }
145
145
  if (urlEncodedBody) {
146
146
  Object.assign(urlEncodedBody, {
147
- 'x-formData': true,
147
+ 'x-isForm': true,
148
148
  'x-tsType': 'FormData',
149
149
  });
150
150
  }
@@ -100,7 +100,7 @@ function withValidationLibrary({ isForm, disableServerSideValidation, skipSchema
100
100
  };
101
101
  const resultHandlerEnhanced = Object.assign(resultHandler, { fn, models });
102
102
  if (toJSONSchema) {
103
- const getJsonSchema = (model, type) => Object.assign(toJSONSchema(model, { type }), type === 'body' && isForm ? { 'x-formData': isForm } : {});
103
+ const getJsonSchema = (model, type) => Object.assign(toJSONSchema(model, { type }), type === 'body' && isForm ? { 'x-isForm': isForm } : {});
104
104
  const validation = {};
105
105
  if (body && !skipSchemaEmissionKeys.includes('body')) {
106
106
  validation.body = getJsonSchema(body, 'body');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.373",
3
+ "version": "3.0.0-draft.374",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",