Skip to content

Commit 1cd8f62

Browse files
committed
chore(code-gen): cleanup RouteBuilder internalSettings
Legacy code-gen used this, but the current code-gen has `metadata`. This is also settable via the public interface, `R.post().preferFormData()`.
1 parent 4bf6848 commit 1cd8f62

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

packages/code-gen/src/builders/RouteBuilder.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ export class RouteBuilder extends TypeBuilder {
132132
this.data.metadata ??= {};
133133
this.data.metadata.requestBodyType = "form-data";
134134

135-
this.data.internalSettings ??= {};
136-
this.data.internalSettings.requestBodyType = "form-data";
137-
138135
return this;
139136
}
140137

packages/code-gen/src/open-api-importer.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,12 @@ function extractRoute(context, path, method) {
123123
compasStruct.metadata = {
124124
requestBodyType: "json",
125125
};
126-
compasStruct.internalSettings = {
127-
requestBodyType: "json",
128-
stripTrailingSlash: !path.endsWith("/"),
129-
};
130126

131127
if (
132128
isNil(item.requestBody?.content?.["application/json"]) &&
133129
!isNil(item.requestBody?.content?.["multipart/form-data"])
134130
) {
135131
contentKey = "multipart/form-data";
136-
compasStruct.internalSettings.requestBodyType = "form-data";
137132
compasStruct.metadata.requestBodyType = "form-data";
138133
}
139134

0 commit comments

Comments
 (0)