Skip to content

Commit 3abf580

Browse files
committed
Customize generator to flatten SDK request body params
1 parent 3fb71b5 commit 3abf580

File tree

7 files changed

+594
-113
lines changed

7 files changed

+594
-113
lines changed

packages/rest-api-sdk/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,13 @@ await api.updateCompanyFlags({
116116
await api.updateBulkFlagSpecificTargets({
117117
appId: "app-123",
118118
envId: "env-456",
119-
bulkUpdateFlagSpecificTargetsSchema: {
120-
updates: [
121-
{ flagKey: "new-checkout", value: true, companyId: "company-1" },
122-
{ flagKey: "new-checkout", value: true, userId: "user-1" },
123-
{ flagKey: "legacy-checkout", value: null, userId: "user-1" },
124-
],
125-
notifications: true,
126-
changeDescription: "Rolling out new checkout to pilot accounts",
127-
},
119+
updates: [
120+
{ flagKey: "new-checkout", value: true, companyId: "company-1" },
121+
{ flagKey: "new-checkout", value: true, userId: "user-1" },
122+
{ flagKey: "legacy-checkout", value: null, userId: "user-1" },
123+
],
124+
notifications: true,
125+
changeDescription: "Rolling out new checkout to pilot accounts",
128126
});
129127
```
130128

packages/rest-api-sdk/openapi-generator.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
generatorName: typescript-fetch
22
inputSpec: ./openapi.json
33
outputDir: src/generated
4+
templateDir: ./openapi-templates
45
additionalProperties:
56
supportsES6: true
67
typescriptThreePlus: true

0 commit comments

Comments
 (0)