swagger-sdk-generator 0.0.0-stage → 3.0.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/README.md +58 -2
- package/dist/cli/commands/generate.d.ts +2 -0
- package/dist/cli/commands/generate.js +196 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +130 -0
- package/dist/cli/commands/inspect.d.ts +2 -0
- package/dist/cli/commands/inspect.js +164 -0
- package/dist/cli/commands/templates.d.ts +2 -0
- package/dist/cli/commands/templates.js +126 -0
- package/dist/cli/context.d.ts +16 -0
- package/dist/cli/context.js +85 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +25 -0
- package/dist/config/dotenv.d.ts +2 -0
- package/dist/config/dotenv.js +82 -0
- package/dist/config/interpolate.d.ts +8 -0
- package/dist/config/interpolate.js +85 -0
- package/dist/config/load.d.ts +11 -0
- package/dist/config/load.js +182 -0
- package/dist/config/migrate-v3.d.ts +5 -0
- package/dist/config/migrate-v3.js +6 -0
- package/dist/config/mode-compatibility.d.ts +9 -0
- package/dist/config/mode-compatibility.js +17 -0
- package/dist/config/modes.d.ts +13 -0
- package/dist/config/modes.js +27 -0
- package/dist/config/preset-definitions.d.ts +2 -0
- package/dist/config/preset-definitions.js +4 -0
- package/dist/config/presets.d.ts +25 -0
- package/dist/config/presets.js +36 -0
- package/dist/config/resolve.d.ts +32 -0
- package/dist/config/resolve.js +288 -0
- package/dist/config/schema.d.ts +93 -0
- package/dist/config/schema.js +173 -0
- package/dist/config/types.d.ts +42 -0
- package/dist/config/types.js +2 -0
- package/dist/config/workspace.d.ts +30 -0
- package/dist/config/workspace.js +95 -0
- package/dist/core/case-align.d.ts +5 -0
- package/dist/core/case-align.js +90 -0
- package/dist/core/deep-merge.d.ts +2 -0
- package/dist/core/deep-merge.js +21 -0
- package/dist/core/file-set.d.ts +10 -0
- package/dist/core/file-set.js +31 -0
- package/dist/core/import-module.d.ts +1 -0
- package/dist/core/import-module.js +61 -0
- package/dist/core/log.d.ts +9 -0
- package/dist/core/log.js +24 -0
- package/dist/core/manifest.d.ts +17 -0
- package/dist/core/manifest.js +195 -0
- package/dist/core/overlaps.d.ts +6 -0
- package/dist/core/overlaps.js +67 -0
- package/dist/core/package-version.d.ts +1 -0
- package/dist/core/package-version.js +44 -0
- package/dist/core/pipeline.d.ts +30 -0
- package/dist/core/pipeline.js +335 -0
- package/dist/core/plugin.d.ts +72 -0
- package/dist/core/plugin.js +2 -0
- package/dist/core/targets.d.ts +14 -0
- package/dist/core/targets.js +120 -0
- package/dist/core/unmanaged.d.ts +3 -0
- package/dist/core/unmanaged.js +101 -0
- package/dist/core/writer.d.ts +28 -0
- package/dist/core/writer.js +148 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +37 -0
- package/dist/ir/casing.d.ts +5 -0
- package/dist/ir/casing.js +22 -0
- package/dist/ir/graph.d.ts +8 -0
- package/dist/ir/graph.js +95 -0
- package/dist/ir/operations/grouping.d.ts +17 -0
- package/dist/ir/operations/grouping.js +39 -0
- package/dist/ir/operations/legacy-naming.d.ts +2 -0
- package/dist/ir/operations/legacy-naming.js +8 -0
- package/dist/ir/operations/naming.d.ts +6 -0
- package/dist/ir/operations/naming.js +54 -0
- package/dist/ir/option-errors.d.ts +3 -0
- package/dist/ir/option-errors.js +68 -0
- package/dist/ir/transforms/builtins.d.ts +2 -0
- package/dist/ir/transforms/builtins.js +4 -0
- package/dist/ir/transforms/index.d.ts +10 -0
- package/dist/ir/transforms/index.js +39 -0
- package/dist/ir/transforms/types.d.ts +9 -0
- package/dist/ir/transforms/types.js +2 -0
- package/dist/ir/types.d.ts +140 -0
- package/dist/ir/types.js +2 -0
- package/dist/runtime/axios.d.ts +28 -0
- package/dist/runtime/axios.js +132 -0
- package/dist/runtime/fetch.d.ts +6 -0
- package/dist/runtime/fetch.js +38 -0
- package/dist/runtime/index.d.ts +54 -0
- package/dist/runtime/index.js +167 -0
- package/dist/runtime/rtk.d.ts +35 -0
- package/dist/runtime/rtk.js +36 -0
- package/dist/runtime/transport.d.ts +38 -0
- package/dist/runtime/transport.js +30 -0
- package/dist/runtime/wire.d.ts +27 -0
- package/dist/runtime/wire.js +148 -0
- package/dist/spec/html-entities.d.ts +1 -0
- package/dist/spec/html-entities.js +25 -0
- package/dist/spec/load.d.ts +26 -0
- package/dist/spec/load.js +130 -0
- package/dist/spec/openapi/all-of.d.ts +3 -0
- package/dist/spec/openapi/all-of.js +9 -0
- package/dist/spec/openapi/normalize.d.ts +4 -0
- package/dist/spec/openapi/normalize.js +31 -0
- package/dist/spec/openapi/operations.d.ts +4 -0
- package/dist/spec/openapi/operations.js +173 -0
- package/dist/spec/openapi/schema.d.ts +51 -0
- package/dist/spec/openapi/schema.js +307 -0
- package/dist/targets/declarative/config.d.ts +533 -0
- package/dist/targets/declarative/config.js +280 -0
- package/dist/targets/declarative/extensions.d.ts +45 -0
- package/dist/targets/declarative/extensions.js +123 -0
- package/dist/targets/declarative/files.d.ts +13 -0
- package/dist/targets/declarative/files.js +127 -0
- package/dist/targets/declarative/format.d.ts +4 -0
- package/dist/targets/declarative/format.js +104 -0
- package/dist/targets/declarative/index.d.ts +9 -0
- package/dist/targets/declarative/index.js +170 -0
- package/dist/targets/declarative/liquid.d.ts +8 -0
- package/dist/targets/declarative/liquid.js +57 -0
- package/dist/targets/declarative/naming-case.d.ts +3 -0
- package/dist/targets/declarative/naming-case.js +31 -0
- package/dist/targets/declarative/naming.d.ts +42 -0
- package/dist/targets/declarative/naming.js +174 -0
- package/dist/targets/declarative/scaffold.d.ts +5 -0
- package/dist/targets/declarative/scaffold.js +146 -0
- package/dist/targets/declarative/types.d.ts +52 -0
- package/dist/targets/declarative/types.js +287 -0
- package/dist/targets/declarative/views.d.ts +180 -0
- package/dist/targets/declarative/views.js +447 -0
- package/dist/targets/python/extensions.js +152 -0
- package/dist/targets/python/target.json +549 -0
- package/dist/targets/python/templates/client/client.liquid +114 -0
- package/dist/targets/python/templates/client/httpx_transport.liquid +172 -0
- package/dist/targets/python/templates/client/init.liquid +20 -0
- package/dist/targets/python/templates/client/partials/operation_method.liquid +41 -0
- package/dist/targets/python/templates/client/resource.liquid +28 -0
- package/dist/targets/python/templates/client/runtime.liquid +133 -0
- package/dist/targets/python/templates/client/transport.liquid +62 -0
- package/dist/targets/python/templates/models/module.liquid +48 -0
- package/dist/targets/python/templates/models/partials/docstring.liquid +5 -0
- package/dist/targets/python/templates/models/partials/enum_class.liquid +11 -0
- package/dist/targets/python/templates/models/partials/field_line.liquid +5 -0
- package/dist/targets/python/templates/models/partials/model_class.liquid +17 -0
- package/dist/targets/typescript/compatibility-naming.d.ts +6 -0
- package/dist/targets/typescript/compatibility-naming.js +28 -0
- package/dist/targets/typescript/compatibility-options.d.ts +5 -0
- package/dist/targets/typescript/compatibility-options.js +8 -0
- package/dist/targets/typescript/compatibility-target.d.ts +5 -0
- package/dist/targets/typescript/compatibility-target.js +10 -0
- package/dist/targets/typescript/http-operations.d.ts +34 -0
- package/dist/targets/typescript/http-operations.js +155 -0
- package/dist/targets/typescript/imports.d.ts +43 -0
- package/dist/targets/typescript/imports.js +154 -0
- package/dist/targets/typescript/index.d.ts +7 -0
- package/dist/targets/typescript/index.js +52 -0
- package/dist/targets/typescript/mock-compatibility.d.ts +4 -0
- package/dist/targets/typescript/mock-compatibility.js +6 -0
- package/dist/targets/typescript/mock-hints.d.ts +13 -0
- package/dist/targets/typescript/mock-hints.js +75 -0
- package/dist/targets/typescript/mock-reachability.d.ts +12 -0
- package/dist/targets/typescript/mock-reachability.js +87 -0
- package/dist/targets/typescript/model-compatibility.d.ts +14 -0
- package/dist/targets/typescript/model-compatibility.js +16 -0
- package/dist/targets/typescript/naming.d.ts +13 -0
- package/dist/targets/typescript/naming.js +50 -0
- package/dist/targets/typescript/options.d.ts +124 -0
- package/dist/targets/typescript/options.js +90 -0
- package/dist/targets/typescript/outputs/client.d.ts +67 -0
- package/dist/targets/typescript/outputs/client.js +187 -0
- package/dist/targets/typescript/outputs/mocks.d.ts +32 -0
- package/dist/targets/typescript/outputs/mocks.js +371 -0
- package/dist/targets/typescript/outputs/models.d.ts +85 -0
- package/dist/targets/typescript/outputs/models.js +246 -0
- package/dist/targets/typescript/outputs/rtk-query.d.ts +69 -0
- package/dist/targets/typescript/outputs/rtk-query.js +266 -0
- package/dist/targets/typescript/prettier.d.ts +7 -0
- package/dist/targets/typescript/prettier.js +44 -0
- package/dist/targets/typescript/templates/client/client.liquid +30 -0
- package/dist/targets/typescript/templates/client/partials/api-member.liquid +13 -0
- package/dist/targets/typescript/templates/client/partials/jsdoc.liquid +10 -0
- package/dist/targets/typescript/templates/client/partials/method.liquid +26 -0
- package/dist/targets/typescript/templates/client/partials/query-type.liquid +10 -0
- package/dist/targets/typescript/templates/client/resource.liquid +34 -0
- package/dist/targets/typescript/templates/mocks/mock.liquid +15 -0
- package/dist/targets/typescript/templates/mocks/partials/factory.liquid +12 -0
- package/dist/targets/typescript/templates/mocks/partials/imports.liquid +7 -0
- package/dist/targets/typescript/templates/models/alias.liquid +16 -0
- package/dist/targets/typescript/templates/models/enum.liquid +27 -0
- package/dist/targets/typescript/templates/models/index.liquid +14 -0
- package/dist/targets/typescript/templates/models/model.liquid +25 -0
- package/dist/targets/typescript/templates/models/partials/const.liquid +10 -0
- package/dist/targets/typescript/templates/models/partials/imports.liquid +9 -0
- package/dist/targets/typescript/templates/models/partials/jsdoc.liquid +9 -0
- package/dist/targets/typescript/templates/models/partials/property.liquid +7 -0
- package/dist/targets/typescript/templates/rtk-query/api.liquid +16 -0
- package/dist/targets/typescript/templates/rtk-query/partials/arg-types.liquid +6 -0
- package/dist/targets/typescript/templates/rtk-query/partials/endpoint-mutation.liquid +13 -0
- package/dist/targets/typescript/templates/rtk-query/partials/endpoint-query.liquid +13 -0
- package/dist/targets/typescript/templates/rtk-query/partials/file-warning.liquid +7 -0
- package/dist/targets/typescript/templates/rtk-query/partials/hooks.liquid +9 -0
- package/dist/targets/typescript/templates/rtk-query/partials/imports.liquid +7 -0
- package/dist/targets/typescript/templates/rtk-query/partials/request-config.liquid +9 -0
- package/dist/targets/typescript/templates/rtk-query/resource.liquid +40 -0
- package/dist/targets/typescript/ts-type.d.ts +70 -0
- package/dist/targets/typescript/ts-type.js +62 -0
- package/dist/targets/typescript/type-printer.d.ts +21 -0
- package/dist/targets/typescript/type-printer.js +115 -0
- package/dist/templates/engine.d.ts +20 -0
- package/dist/templates/engine.js +161 -0
- package/dist/templates/inspect.d.ts +27 -0
- package/dist/templates/inspect.js +331 -0
- package/package.json +65 -4
- package/schema/sdk-gen.local.schema.json +75 -0
- package/schema/sdk-gen.schema.json +980 -0
- package/schema/sdk-gen.target.schema.json +1384 -0
|
@@ -0,0 +1,980 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"$schema": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"version": {
|
|
9
|
+
"type": "number",
|
|
10
|
+
"const": 4
|
|
11
|
+
},
|
|
12
|
+
"mode": {
|
|
13
|
+
"description": "TypeScript SDK mode. Default uses Redux Toolkit and future uses the configurable SDK runtime.",
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": [
|
|
16
|
+
"default",
|
|
17
|
+
"future"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"target": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"targetOptions": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"propertyNames": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": {}
|
|
29
|
+
},
|
|
30
|
+
"plugins": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"templates": {
|
|
37
|
+
"anyOf": [
|
|
38
|
+
{
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"workspace": {
|
|
50
|
+
"anyOf": [
|
|
51
|
+
{
|
|
52
|
+
"type": "string"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"default": {
|
|
58
|
+
"description": "Interpolated default workspace, e.g. \"${ENV_URL:-}\".",
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"pattern": {
|
|
62
|
+
"description": "Regex applied to the default: when it matches, capture group 1 is the workspace.",
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"prompt": {
|
|
66
|
+
"description": "Ask on a TTY when nothing else (CLI, config, SDK_WORKSPACE) sets the workspace.",
|
|
67
|
+
"type": "boolean"
|
|
68
|
+
},
|
|
69
|
+
"production": {
|
|
70
|
+
"description": "The token that selects production (e.g. \"-\"), for -w and the prompt.",
|
|
71
|
+
"type": "string"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"hosts": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"workspace": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Host for a workspace, e.g. \"{workspace}.dev.example.com\"."
|
|
84
|
+
},
|
|
85
|
+
"production": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Host when production is selected, e.g. \"example.com\"."
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"workspace",
|
|
92
|
+
"production"
|
|
93
|
+
],
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"description": "Values of the {host} placeholder."
|
|
96
|
+
},
|
|
97
|
+
"envFile": {
|
|
98
|
+
"description": "dotenv files (relative to the config file) feeding ${VAR}; lowest precedence, missing files skipped.",
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"env": {
|
|
112
|
+
"description": "Values for ${VAR} interpolation; the real environment wins. Secrets belong in the gitignored local file.",
|
|
113
|
+
"type": "object",
|
|
114
|
+
"propertyNames": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"prune": {
|
|
122
|
+
"type": "boolean"
|
|
123
|
+
},
|
|
124
|
+
"defaults": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"normalize": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"allOf": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"enum": [
|
|
133
|
+
"intersection"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"additionalProperties": false
|
|
138
|
+
},
|
|
139
|
+
"transforms": {
|
|
140
|
+
"type": "object",
|
|
141
|
+
"propertyNames": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"additionalProperties": {
|
|
145
|
+
"anyOf": [
|
|
146
|
+
{
|
|
147
|
+
"type": "boolean"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"type": "object",
|
|
151
|
+
"propertyNames": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"additionalProperties": {}
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"properties": {}
|
|
159
|
+
},
|
|
160
|
+
"outputs": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"propertyNames": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"additionalProperties": {
|
|
166
|
+
"anyOf": [
|
|
167
|
+
{
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"const": false
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"type": "object",
|
|
173
|
+
"propertyNames": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"additionalProperties": {}
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"properties": {
|
|
181
|
+
"models": {
|
|
182
|
+
"anyOf": [
|
|
183
|
+
{
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"const": false
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"type": "object",
|
|
189
|
+
"properties": {
|
|
190
|
+
"dir": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
193
|
+
},
|
|
194
|
+
"format": {
|
|
195
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
196
|
+
"type": "boolean"
|
|
197
|
+
},
|
|
198
|
+
"engine": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"const": "ir"
|
|
201
|
+
},
|
|
202
|
+
"layout": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"enum": [
|
|
205
|
+
"namespace",
|
|
206
|
+
"flat"
|
|
207
|
+
],
|
|
208
|
+
"description": "`namespace`: `App.Domain.User` -> `App/Domain/User.ts` exporting `User`. `flat`: `App_Domain_User.ts`."
|
|
209
|
+
},
|
|
210
|
+
"importPath": {
|
|
211
|
+
"description": "Non-relative module prefix for model imports (`@models/swagger`). Unset -> relative imports.",
|
|
212
|
+
"type": "string"
|
|
213
|
+
},
|
|
214
|
+
"index": {
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"description": "Emit a barrel `index.ts`."
|
|
217
|
+
},
|
|
218
|
+
"inlineEnums": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"enum": [
|
|
221
|
+
"const",
|
|
222
|
+
"union"
|
|
223
|
+
],
|
|
224
|
+
"description": "Property-level enums: hoisted `export const <Model><Prop> = {...}` objects, or inline literal unions. `const` is the legacy dialect: enums that cannot be hoisted (array items, union members) are spelled by their base type (`string`, or the schema `title`), exactly as legacy did."
|
|
225
|
+
},
|
|
226
|
+
"strictEnums": {
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"description": "With `inlineEnums: 'const'`: also emit `<Name>Strict = {...} as const`."
|
|
229
|
+
},
|
|
230
|
+
"enumSchemas": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"enum": [
|
|
233
|
+
"enum",
|
|
234
|
+
"union",
|
|
235
|
+
"const"
|
|
236
|
+
],
|
|
237
|
+
"description": "Top-level enum components: `export enum`, literal-union alias, or const object."
|
|
238
|
+
},
|
|
239
|
+
"objectTypeConst": {
|
|
240
|
+
"type": "boolean",
|
|
241
|
+
"const": false
|
|
242
|
+
},
|
|
243
|
+
"arrayStyle": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"enum": [
|
|
246
|
+
"brackets",
|
|
247
|
+
"generic"
|
|
248
|
+
],
|
|
249
|
+
"description": "TypeScript array spelling."
|
|
250
|
+
},
|
|
251
|
+
"untyped": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"enum": [
|
|
254
|
+
"unknown",
|
|
255
|
+
"any",
|
|
256
|
+
"object"
|
|
257
|
+
],
|
|
258
|
+
"description": "Spelling of a type with no information."
|
|
259
|
+
},
|
|
260
|
+
"nestedArrays": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"enum": [
|
|
263
|
+
"preserve",
|
|
264
|
+
"any"
|
|
265
|
+
],
|
|
266
|
+
"description": "`any`: nested arrays collapse to `any[]` (legacy)."
|
|
267
|
+
},
|
|
268
|
+
"nullable": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"enum": [
|
|
271
|
+
"ignore",
|
|
272
|
+
"union",
|
|
273
|
+
"property"
|
|
274
|
+
],
|
|
275
|
+
"description": "`ignore`: drop `nullable`. `union`: append `| null` to every nullable type. `property` (legacy): append `| null` to an object property's own type only (not array items, union members, aliases or parameters)."
|
|
276
|
+
},
|
|
277
|
+
"inlineObjects": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"enum": [
|
|
280
|
+
"literal",
|
|
281
|
+
"object"
|
|
282
|
+
],
|
|
283
|
+
"description": "Inline (non-component) object schemas. `literal`: printed as type literals, free-form ones as `Record<string, unknown>`. `object` (legacy): spelled `object` - the legacy generator never printed inline object shapes; a model-level free-form object is `{}`."
|
|
284
|
+
},
|
|
285
|
+
"typeImports": {
|
|
286
|
+
"type": "boolean",
|
|
287
|
+
"description": "Import model types with `import type` (legacy: plain `import { ... }`)."
|
|
288
|
+
},
|
|
289
|
+
"legacyQuirks": {
|
|
290
|
+
"type": "boolean",
|
|
291
|
+
"const": false
|
|
292
|
+
},
|
|
293
|
+
"header": {
|
|
294
|
+
"description": "Optional banner at the top of every model file: verbatim when it is already a comment, else `// `-prefixed per line.",
|
|
295
|
+
"type": "string"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"additionalProperties": false
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"client": {
|
|
303
|
+
"anyOf": [
|
|
304
|
+
{
|
|
305
|
+
"type": "boolean",
|
|
306
|
+
"const": false
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"type": "object",
|
|
310
|
+
"properties": {
|
|
311
|
+
"dir": {
|
|
312
|
+
"type": "string",
|
|
313
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
314
|
+
},
|
|
315
|
+
"format": {
|
|
316
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
317
|
+
"type": "boolean"
|
|
318
|
+
},
|
|
319
|
+
"stripPrefixes": {
|
|
320
|
+
"type": "array",
|
|
321
|
+
"items": {
|
|
322
|
+
"type": "string"
|
|
323
|
+
},
|
|
324
|
+
"description": "Leading path prefixes ignored when deriving resource names (legacy: `/app/api`)."
|
|
325
|
+
},
|
|
326
|
+
"folders": {
|
|
327
|
+
"type": "boolean",
|
|
328
|
+
"description": "First segment becomes a folder, second names the resource (legacy `useFolders`)."
|
|
329
|
+
},
|
|
330
|
+
"naming": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"enum": [
|
|
333
|
+
"path",
|
|
334
|
+
"path-last-param",
|
|
335
|
+
"operation-id"
|
|
336
|
+
],
|
|
337
|
+
"description": "Operation (method) naming strategy."
|
|
338
|
+
},
|
|
339
|
+
"basePath": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"description": "Prefixed to every request path."
|
|
342
|
+
},
|
|
343
|
+
"transport": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"enum": [
|
|
346
|
+
"fetch",
|
|
347
|
+
"none"
|
|
348
|
+
],
|
|
349
|
+
"description": "`fetch`: default to the package Fetch adapter. `none`: require an injected Transport (for example, your Axios instance)."
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"additionalProperties": false
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
"rtkQuery": {
|
|
357
|
+
"anyOf": [
|
|
358
|
+
{
|
|
359
|
+
"type": "boolean",
|
|
360
|
+
"const": false
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"type": "object",
|
|
364
|
+
"properties": {
|
|
365
|
+
"dir": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
368
|
+
},
|
|
369
|
+
"format": {
|
|
370
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
371
|
+
"type": "boolean"
|
|
372
|
+
},
|
|
373
|
+
"reducerPath": {
|
|
374
|
+
"description": "Redux reducer key of the generated API. Defaults to the source name.",
|
|
375
|
+
"type": "string",
|
|
376
|
+
"minLength": 1
|
|
377
|
+
},
|
|
378
|
+
"stripPrefixes": {
|
|
379
|
+
"type": "array",
|
|
380
|
+
"items": {
|
|
381
|
+
"type": "string"
|
|
382
|
+
},
|
|
383
|
+
"description": "Leading path prefixes ignored when deriving resource names (legacy: `/app/api`)."
|
|
384
|
+
},
|
|
385
|
+
"folders": {
|
|
386
|
+
"type": "boolean",
|
|
387
|
+
"description": "First segment becomes a folder, second names the resource (legacy `useFolders`)."
|
|
388
|
+
},
|
|
389
|
+
"naming": {
|
|
390
|
+
"type": "string",
|
|
391
|
+
"enum": [
|
|
392
|
+
"path",
|
|
393
|
+
"path-last-param",
|
|
394
|
+
"operation-id"
|
|
395
|
+
],
|
|
396
|
+
"description": "Operation naming strategy."
|
|
397
|
+
},
|
|
398
|
+
"basePath": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"description": "Prefixed to every endpoint URL."
|
|
401
|
+
},
|
|
402
|
+
"runtime": {
|
|
403
|
+
"anyOf": [
|
|
404
|
+
{
|
|
405
|
+
"type": "string",
|
|
406
|
+
"const": "transport"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"type": "string",
|
|
410
|
+
"const": "toolkit"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"type": "object",
|
|
414
|
+
"properties": {
|
|
415
|
+
"imports": {
|
|
416
|
+
"type": "object",
|
|
417
|
+
"properties": {
|
|
418
|
+
"baseApi": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"description": "Module specifier for the RTK Query base api runtime import."
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"required": [
|
|
424
|
+
"baseApi"
|
|
425
|
+
],
|
|
426
|
+
"additionalProperties": false,
|
|
427
|
+
"description": "Runtime import module specifiers."
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"required": [
|
|
431
|
+
"imports"
|
|
432
|
+
],
|
|
433
|
+
"additionalProperties": false
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
"description": "`toolkit`: thin Redux Toolkit wrapper. `transport`: use the configurable package runtime. `{ imports: { baseApi } }`: use your own Redux Toolkit base API (relative to the output root)."
|
|
437
|
+
},
|
|
438
|
+
"transport": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"enum": [
|
|
441
|
+
"fetch",
|
|
442
|
+
"none"
|
|
443
|
+
],
|
|
444
|
+
"description": "`fetch`: default to the package Fetch adapter. `none`: require an injected Transport (for example, your Axios instance)."
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"additionalProperties": false
|
|
448
|
+
}
|
|
449
|
+
]
|
|
450
|
+
},
|
|
451
|
+
"mocks": {
|
|
452
|
+
"anyOf": [
|
|
453
|
+
{
|
|
454
|
+
"type": "boolean",
|
|
455
|
+
"const": false
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"type": "object",
|
|
459
|
+
"properties": {
|
|
460
|
+
"dir": {
|
|
461
|
+
"type": "string",
|
|
462
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
463
|
+
},
|
|
464
|
+
"format": {
|
|
465
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
466
|
+
"type": "boolean"
|
|
467
|
+
},
|
|
468
|
+
"engine": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"const": "ir"
|
|
471
|
+
},
|
|
472
|
+
"subdir": {
|
|
473
|
+
"type": "string",
|
|
474
|
+
"description": "Mock files live under `<dir>/<subdir>/` (legacy `__model_mocks__`)."
|
|
475
|
+
},
|
|
476
|
+
"style": {
|
|
477
|
+
"type": "string",
|
|
478
|
+
"const": "seeded"
|
|
479
|
+
},
|
|
480
|
+
"arrayLength": {
|
|
481
|
+
"type": "integer",
|
|
482
|
+
"minimum": -9007199254740991,
|
|
483
|
+
"maximum": 9007199254740991,
|
|
484
|
+
"description": "Items generated per array."
|
|
485
|
+
},
|
|
486
|
+
"maxDepth": {
|
|
487
|
+
"type": "integer",
|
|
488
|
+
"minimum": 0,
|
|
489
|
+
"maximum": 9007199254740991,
|
|
490
|
+
"description": "Ref levels composed below a get/create call. Deeper, a ref is `undefined` when optional, `null` when nullable, `[]` for a list of refs, else `undefined as any`. Bounds the mock as a TREE: shared refs would otherwise expand exponentially (and so would toEqual / JSON.stringify / RTK serializable checks walking it)."
|
|
491
|
+
},
|
|
492
|
+
"reachableFrom": {
|
|
493
|
+
"description": "Only generate mocks your code imports (plus the mocks they compose): source dirs scanned for `<subdir>/…mock` imports, relative to the config. Unset = every model.",
|
|
494
|
+
"type": "array",
|
|
495
|
+
"items": {
|
|
496
|
+
"type": "string"
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"additionalProperties": false
|
|
501
|
+
}
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"additionalProperties": false
|
|
508
|
+
},
|
|
509
|
+
"sources": {
|
|
510
|
+
"minItems": 1,
|
|
511
|
+
"type": "array",
|
|
512
|
+
"items": {
|
|
513
|
+
"type": "object",
|
|
514
|
+
"properties": {
|
|
515
|
+
"normalize": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"properties": {
|
|
518
|
+
"allOf": {
|
|
519
|
+
"type": "string",
|
|
520
|
+
"enum": [
|
|
521
|
+
"intersection"
|
|
522
|
+
]
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
"additionalProperties": false
|
|
526
|
+
},
|
|
527
|
+
"transforms": {
|
|
528
|
+
"type": "object",
|
|
529
|
+
"propertyNames": {
|
|
530
|
+
"type": "string"
|
|
531
|
+
},
|
|
532
|
+
"additionalProperties": {
|
|
533
|
+
"anyOf": [
|
|
534
|
+
{
|
|
535
|
+
"type": "boolean"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"type": "object",
|
|
539
|
+
"propertyNames": {
|
|
540
|
+
"type": "string"
|
|
541
|
+
},
|
|
542
|
+
"additionalProperties": {}
|
|
543
|
+
}
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
"properties": {}
|
|
547
|
+
},
|
|
548
|
+
"outputs": {
|
|
549
|
+
"type": "object",
|
|
550
|
+
"propertyNames": {
|
|
551
|
+
"type": "string"
|
|
552
|
+
},
|
|
553
|
+
"additionalProperties": {
|
|
554
|
+
"anyOf": [
|
|
555
|
+
{
|
|
556
|
+
"type": "boolean",
|
|
557
|
+
"const": false
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"type": "object",
|
|
561
|
+
"propertyNames": {
|
|
562
|
+
"type": "string"
|
|
563
|
+
},
|
|
564
|
+
"additionalProperties": {}
|
|
565
|
+
}
|
|
566
|
+
]
|
|
567
|
+
},
|
|
568
|
+
"properties": {
|
|
569
|
+
"models": {
|
|
570
|
+
"anyOf": [
|
|
571
|
+
{
|
|
572
|
+
"type": "boolean",
|
|
573
|
+
"const": false
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"type": "object",
|
|
577
|
+
"properties": {
|
|
578
|
+
"dir": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
581
|
+
},
|
|
582
|
+
"format": {
|
|
583
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
584
|
+
"type": "boolean"
|
|
585
|
+
},
|
|
586
|
+
"engine": {
|
|
587
|
+
"type": "string",
|
|
588
|
+
"const": "ir"
|
|
589
|
+
},
|
|
590
|
+
"layout": {
|
|
591
|
+
"type": "string",
|
|
592
|
+
"enum": [
|
|
593
|
+
"namespace",
|
|
594
|
+
"flat"
|
|
595
|
+
],
|
|
596
|
+
"description": "`namespace`: `App.Domain.User` -> `App/Domain/User.ts` exporting `User`. `flat`: `App_Domain_User.ts`."
|
|
597
|
+
},
|
|
598
|
+
"importPath": {
|
|
599
|
+
"description": "Non-relative module prefix for model imports (`@models/swagger`). Unset -> relative imports.",
|
|
600
|
+
"type": "string"
|
|
601
|
+
},
|
|
602
|
+
"index": {
|
|
603
|
+
"type": "boolean",
|
|
604
|
+
"description": "Emit a barrel `index.ts`."
|
|
605
|
+
},
|
|
606
|
+
"inlineEnums": {
|
|
607
|
+
"type": "string",
|
|
608
|
+
"enum": [
|
|
609
|
+
"const",
|
|
610
|
+
"union"
|
|
611
|
+
],
|
|
612
|
+
"description": "Property-level enums: hoisted `export const <Model><Prop> = {...}` objects, or inline literal unions. `const` is the legacy dialect: enums that cannot be hoisted (array items, union members) are spelled by their base type (`string`, or the schema `title`), exactly as legacy did."
|
|
613
|
+
},
|
|
614
|
+
"strictEnums": {
|
|
615
|
+
"type": "boolean",
|
|
616
|
+
"description": "With `inlineEnums: 'const'`: also emit `<Name>Strict = {...} as const`."
|
|
617
|
+
},
|
|
618
|
+
"enumSchemas": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"enum": [
|
|
621
|
+
"enum",
|
|
622
|
+
"union",
|
|
623
|
+
"const"
|
|
624
|
+
],
|
|
625
|
+
"description": "Top-level enum components: `export enum`, literal-union alias, or const object."
|
|
626
|
+
},
|
|
627
|
+
"objectTypeConst": {
|
|
628
|
+
"type": "boolean",
|
|
629
|
+
"const": false
|
|
630
|
+
},
|
|
631
|
+
"arrayStyle": {
|
|
632
|
+
"type": "string",
|
|
633
|
+
"enum": [
|
|
634
|
+
"brackets",
|
|
635
|
+
"generic"
|
|
636
|
+
],
|
|
637
|
+
"description": "TypeScript array spelling."
|
|
638
|
+
},
|
|
639
|
+
"untyped": {
|
|
640
|
+
"type": "string",
|
|
641
|
+
"enum": [
|
|
642
|
+
"unknown",
|
|
643
|
+
"any",
|
|
644
|
+
"object"
|
|
645
|
+
],
|
|
646
|
+
"description": "Spelling of a type with no information."
|
|
647
|
+
},
|
|
648
|
+
"nestedArrays": {
|
|
649
|
+
"type": "string",
|
|
650
|
+
"enum": [
|
|
651
|
+
"preserve",
|
|
652
|
+
"any"
|
|
653
|
+
],
|
|
654
|
+
"description": "`any`: nested arrays collapse to `any[]` (legacy)."
|
|
655
|
+
},
|
|
656
|
+
"nullable": {
|
|
657
|
+
"type": "string",
|
|
658
|
+
"enum": [
|
|
659
|
+
"ignore",
|
|
660
|
+
"union",
|
|
661
|
+
"property"
|
|
662
|
+
],
|
|
663
|
+
"description": "`ignore`: drop `nullable`. `union`: append `| null` to every nullable type. `property` (legacy): append `| null` to an object property's own type only (not array items, union members, aliases or parameters)."
|
|
664
|
+
},
|
|
665
|
+
"inlineObjects": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"enum": [
|
|
668
|
+
"literal",
|
|
669
|
+
"object"
|
|
670
|
+
],
|
|
671
|
+
"description": "Inline (non-component) object schemas. `literal`: printed as type literals, free-form ones as `Record<string, unknown>`. `object` (legacy): spelled `object` - the legacy generator never printed inline object shapes; a model-level free-form object is `{}`."
|
|
672
|
+
},
|
|
673
|
+
"typeImports": {
|
|
674
|
+
"type": "boolean",
|
|
675
|
+
"description": "Import model types with `import type` (legacy: plain `import { ... }`)."
|
|
676
|
+
},
|
|
677
|
+
"legacyQuirks": {
|
|
678
|
+
"type": "boolean",
|
|
679
|
+
"const": false
|
|
680
|
+
},
|
|
681
|
+
"header": {
|
|
682
|
+
"description": "Optional banner at the top of every model file: verbatim when it is already a comment, else `// `-prefixed per line.",
|
|
683
|
+
"type": "string"
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
"additionalProperties": false
|
|
687
|
+
}
|
|
688
|
+
]
|
|
689
|
+
},
|
|
690
|
+
"client": {
|
|
691
|
+
"anyOf": [
|
|
692
|
+
{
|
|
693
|
+
"type": "boolean",
|
|
694
|
+
"const": false
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"type": "object",
|
|
698
|
+
"properties": {
|
|
699
|
+
"dir": {
|
|
700
|
+
"type": "string",
|
|
701
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
702
|
+
},
|
|
703
|
+
"format": {
|
|
704
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
705
|
+
"type": "boolean"
|
|
706
|
+
},
|
|
707
|
+
"stripPrefixes": {
|
|
708
|
+
"type": "array",
|
|
709
|
+
"items": {
|
|
710
|
+
"type": "string"
|
|
711
|
+
},
|
|
712
|
+
"description": "Leading path prefixes ignored when deriving resource names (legacy: `/app/api`)."
|
|
713
|
+
},
|
|
714
|
+
"folders": {
|
|
715
|
+
"type": "boolean",
|
|
716
|
+
"description": "First segment becomes a folder, second names the resource (legacy `useFolders`)."
|
|
717
|
+
},
|
|
718
|
+
"naming": {
|
|
719
|
+
"type": "string",
|
|
720
|
+
"enum": [
|
|
721
|
+
"path",
|
|
722
|
+
"path-last-param",
|
|
723
|
+
"operation-id"
|
|
724
|
+
],
|
|
725
|
+
"description": "Operation (method) naming strategy."
|
|
726
|
+
},
|
|
727
|
+
"basePath": {
|
|
728
|
+
"type": "string",
|
|
729
|
+
"description": "Prefixed to every request path."
|
|
730
|
+
},
|
|
731
|
+
"transport": {
|
|
732
|
+
"type": "string",
|
|
733
|
+
"enum": [
|
|
734
|
+
"fetch",
|
|
735
|
+
"none"
|
|
736
|
+
],
|
|
737
|
+
"description": "`fetch`: default to the package Fetch adapter. `none`: require an injected Transport (for example, your Axios instance)."
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"additionalProperties": false
|
|
741
|
+
}
|
|
742
|
+
]
|
|
743
|
+
},
|
|
744
|
+
"rtkQuery": {
|
|
745
|
+
"anyOf": [
|
|
746
|
+
{
|
|
747
|
+
"type": "boolean",
|
|
748
|
+
"const": false
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"type": "object",
|
|
752
|
+
"properties": {
|
|
753
|
+
"dir": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
756
|
+
},
|
|
757
|
+
"format": {
|
|
758
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
759
|
+
"type": "boolean"
|
|
760
|
+
},
|
|
761
|
+
"reducerPath": {
|
|
762
|
+
"description": "Redux reducer key of the generated API. Defaults to the source name.",
|
|
763
|
+
"type": "string",
|
|
764
|
+
"minLength": 1
|
|
765
|
+
},
|
|
766
|
+
"stripPrefixes": {
|
|
767
|
+
"type": "array",
|
|
768
|
+
"items": {
|
|
769
|
+
"type": "string"
|
|
770
|
+
},
|
|
771
|
+
"description": "Leading path prefixes ignored when deriving resource names (legacy: `/app/api`)."
|
|
772
|
+
},
|
|
773
|
+
"folders": {
|
|
774
|
+
"type": "boolean",
|
|
775
|
+
"description": "First segment becomes a folder, second names the resource (legacy `useFolders`)."
|
|
776
|
+
},
|
|
777
|
+
"naming": {
|
|
778
|
+
"type": "string",
|
|
779
|
+
"enum": [
|
|
780
|
+
"path",
|
|
781
|
+
"path-last-param",
|
|
782
|
+
"operation-id"
|
|
783
|
+
],
|
|
784
|
+
"description": "Operation naming strategy."
|
|
785
|
+
},
|
|
786
|
+
"basePath": {
|
|
787
|
+
"type": "string",
|
|
788
|
+
"description": "Prefixed to every endpoint URL."
|
|
789
|
+
},
|
|
790
|
+
"runtime": {
|
|
791
|
+
"anyOf": [
|
|
792
|
+
{
|
|
793
|
+
"type": "string",
|
|
794
|
+
"const": "transport"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"type": "string",
|
|
798
|
+
"const": "toolkit"
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"type": "object",
|
|
802
|
+
"properties": {
|
|
803
|
+
"imports": {
|
|
804
|
+
"type": "object",
|
|
805
|
+
"properties": {
|
|
806
|
+
"baseApi": {
|
|
807
|
+
"type": "string",
|
|
808
|
+
"description": "Module specifier for the RTK Query base api runtime import."
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
"required": [
|
|
812
|
+
"baseApi"
|
|
813
|
+
],
|
|
814
|
+
"additionalProperties": false,
|
|
815
|
+
"description": "Runtime import module specifiers."
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
"required": [
|
|
819
|
+
"imports"
|
|
820
|
+
],
|
|
821
|
+
"additionalProperties": false
|
|
822
|
+
}
|
|
823
|
+
],
|
|
824
|
+
"description": "`toolkit`: thin Redux Toolkit wrapper. `transport`: use the configurable package runtime. `{ imports: { baseApi } }`: use your own Redux Toolkit base API (relative to the output root)."
|
|
825
|
+
},
|
|
826
|
+
"transport": {
|
|
827
|
+
"type": "string",
|
|
828
|
+
"enum": [
|
|
829
|
+
"fetch",
|
|
830
|
+
"none"
|
|
831
|
+
],
|
|
832
|
+
"description": "`fetch`: default to the package Fetch adapter. `none`: require an injected Transport (for example, your Axios instance)."
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
"additionalProperties": false
|
|
836
|
+
}
|
|
837
|
+
]
|
|
838
|
+
},
|
|
839
|
+
"mocks": {
|
|
840
|
+
"anyOf": [
|
|
841
|
+
{
|
|
842
|
+
"type": "boolean",
|
|
843
|
+
"const": false
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"type": "object",
|
|
847
|
+
"properties": {
|
|
848
|
+
"dir": {
|
|
849
|
+
"type": "string",
|
|
850
|
+
"description": "Output directory (resolved against cwd by the core)."
|
|
851
|
+
},
|
|
852
|
+
"format": {
|
|
853
|
+
"description": "Run the target formatter over this output's files (default true).",
|
|
854
|
+
"type": "boolean"
|
|
855
|
+
},
|
|
856
|
+
"engine": {
|
|
857
|
+
"type": "string",
|
|
858
|
+
"const": "ir"
|
|
859
|
+
},
|
|
860
|
+
"subdir": {
|
|
861
|
+
"type": "string",
|
|
862
|
+
"description": "Mock files live under `<dir>/<subdir>/` (legacy `__model_mocks__`)."
|
|
863
|
+
},
|
|
864
|
+
"style": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"const": "seeded"
|
|
867
|
+
},
|
|
868
|
+
"arrayLength": {
|
|
869
|
+
"type": "integer",
|
|
870
|
+
"minimum": -9007199254740991,
|
|
871
|
+
"maximum": 9007199254740991,
|
|
872
|
+
"description": "Items generated per array."
|
|
873
|
+
},
|
|
874
|
+
"maxDepth": {
|
|
875
|
+
"type": "integer",
|
|
876
|
+
"minimum": 0,
|
|
877
|
+
"maximum": 9007199254740991,
|
|
878
|
+
"description": "Ref levels composed below a get/create call. Deeper, a ref is `undefined` when optional, `null` when nullable, `[]` for a list of refs, else `undefined as any`. Bounds the mock as a TREE: shared refs would otherwise expand exponentially (and so would toEqual / JSON.stringify / RTK serializable checks walking it)."
|
|
879
|
+
},
|
|
880
|
+
"reachableFrom": {
|
|
881
|
+
"description": "Only generate mocks your code imports (plus the mocks they compose): source dirs scanned for `<subdir>/…mock` imports, relative to the config. Unset = every model.",
|
|
882
|
+
"type": "array",
|
|
883
|
+
"items": {
|
|
884
|
+
"type": "string"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
"additionalProperties": false
|
|
889
|
+
}
|
|
890
|
+
]
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
"name": {
|
|
895
|
+
"type": "string",
|
|
896
|
+
"pattern": "^[A-Za-z0-9._-]+$"
|
|
897
|
+
},
|
|
898
|
+
"url": {
|
|
899
|
+
"type": "string"
|
|
900
|
+
},
|
|
901
|
+
"file": {
|
|
902
|
+
"type": "string"
|
|
903
|
+
},
|
|
904
|
+
"headers": {
|
|
905
|
+
"type": "object",
|
|
906
|
+
"propertyNames": {
|
|
907
|
+
"type": "string"
|
|
908
|
+
},
|
|
909
|
+
"additionalProperties": {
|
|
910
|
+
"anyOf": [
|
|
911
|
+
{
|
|
912
|
+
"type": "string"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"type": "object",
|
|
916
|
+
"properties": {
|
|
917
|
+
"value": {
|
|
918
|
+
"type": "string"
|
|
919
|
+
},
|
|
920
|
+
"when": {
|
|
921
|
+
"type": "string",
|
|
922
|
+
"description": "Interpolated; the header is sent only when this is non-empty (e.g. \"${ADMIN_JWT:-}\")."
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"required": [
|
|
926
|
+
"value",
|
|
927
|
+
"when"
|
|
928
|
+
],
|
|
929
|
+
"additionalProperties": false
|
|
930
|
+
}
|
|
931
|
+
]
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
"skip": {
|
|
935
|
+
"description": "Interpolated; non-empty → this source is skipped this run (e.g. \"${OFFLINE_SPEC:-}\").",
|
|
936
|
+
"type": "string"
|
|
937
|
+
},
|
|
938
|
+
"onError": {
|
|
939
|
+
"description": "Makes the source non-fatal: when it fails (fetch, HTTP status, parse, generation) this warning is logged (`{error}` = the error message), nothing of it is written or pruned, and the run continues and succeeds without it.",
|
|
940
|
+
"type": "string",
|
|
941
|
+
"minLength": 1
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"required": [
|
|
945
|
+
"name"
|
|
946
|
+
],
|
|
947
|
+
"additionalProperties": false
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
"required": [
|
|
952
|
+
"version"
|
|
953
|
+
],
|
|
954
|
+
"additionalProperties": false,
|
|
955
|
+
"allOf": [
|
|
956
|
+
{
|
|
957
|
+
"required": [
|
|
958
|
+
"sources"
|
|
959
|
+
],
|
|
960
|
+
"properties": {
|
|
961
|
+
"sources": {
|
|
962
|
+
"items": {
|
|
963
|
+
"anyOf": [
|
|
964
|
+
{
|
|
965
|
+
"required": [
|
|
966
|
+
"url"
|
|
967
|
+
]
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"required": [
|
|
971
|
+
"file"
|
|
972
|
+
]
|
|
973
|
+
}
|
|
974
|
+
]
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
}
|