@orval/core 7.11.0 → 7.11.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/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50161,10 +50161,14 @@ var getSchemaFormDataAndUrlEncoded = ({
|
|
|
50161
50161
|
schema2,
|
|
50162
50162
|
context
|
|
50163
50163
|
);
|
|
50164
|
-
|
|
50165
|
-
|
|
50166
|
-
|
|
50167
|
-
|
|
50164
|
+
let newPropName = propName;
|
|
50165
|
+
let newPropDefinition = "";
|
|
50166
|
+
if (shouldCast && imports2[0]) {
|
|
50167
|
+
additionalImports.push(imports2[0]);
|
|
50168
|
+
newPropName = `${propName}${pascal(imports2[0].name)}`;
|
|
50169
|
+
newPropDefinition = `const ${newPropName} = (${propName} as ${imports2[0].name}${isRequestBodyOptional ? " | undefined" : ""});
|
|
50170
|
+
`;
|
|
50171
|
+
}
|
|
50168
50172
|
return newPropDefinition + resolveSchemaPropertiesToFormData({
|
|
50169
50173
|
schema: combinedSchema,
|
|
50170
50174
|
variableName,
|