@shopware/api-gen 1.1.3 → 1.2.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 +26 -6
- package/bin/api-gen.mjs +0 -1
- package/dist/cli.mjs +8783 -8689
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Example of overrides file:
|
|
|
46
46
|
<!-- automd:file src="packages/api-gen/tests/snapshots-override/simpleOverride.example.ts" code -->
|
|
47
47
|
|
|
48
48
|
```ts [simpleOverride.example.ts]
|
|
49
|
-
import { components as mainComponents } from "./storeApiTypes";
|
|
49
|
+
import type { components as mainComponents } from "./storeApiTypes";
|
|
50
50
|
|
|
51
51
|
export type components = mainComponents & {
|
|
52
52
|
schemas: Schemas;
|
|
@@ -107,7 +107,18 @@ Example:
|
|
|
107
107
|
|
|
108
108
|
```json
|
|
109
109
|
{
|
|
110
|
-
"patches": "./api-types/storeApiTypes.overrides.json"
|
|
110
|
+
"patches": ["./api-types/storeApiTypes.overrides.json"]
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
or you could use multiple patches and add your own overrides on top:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"patches": [
|
|
119
|
+
"https://raw.githubusercontent.com/shopware/frontends/refs/heads/main/packages/api-client/api-types/storeApiSchema.overrides.json",
|
|
120
|
+
"./api-types/myOwnPatches.overrides.json"
|
|
121
|
+
]
|
|
111
122
|
}
|
|
112
123
|
```
|
|
113
124
|
|
|
@@ -175,6 +186,11 @@ pnpx @shopware/api-gen generate --apiType=store
|
|
|
175
186
|
pnpx @shopware/api-gen generate --apiType=admin
|
|
176
187
|
```
|
|
177
188
|
|
|
189
|
+
flags:
|
|
190
|
+
|
|
191
|
+
- `--debug` - display debug logs and additional information which can be helpful in case of issues
|
|
192
|
+
- `--logPatches` - display patched logs, useful when you want to fix schema in original file
|
|
193
|
+
|
|
178
194
|
### `loadSchema`
|
|
179
195
|
|
|
180
196
|
Load OpenAPI specification from Shopware instance and save it to JSON file.
|
|
@@ -191,6 +207,11 @@ pnpx @shopware/api-gen loadSchema --apiType=store
|
|
|
191
207
|
pnpx @shopware/api-gen loadSchema --apiType=admin
|
|
192
208
|
```
|
|
193
209
|
|
|
210
|
+
flags:
|
|
211
|
+
|
|
212
|
+
- `--debug` - display debug logs and additional information which can be helpful in case of issues
|
|
213
|
+
- `--logPatches` - display patched logs, useful when you want to fix schema in original file
|
|
214
|
+
|
|
194
215
|
Remember to add `.env` file in order to authenticate with Shopware instance.
|
|
195
216
|
|
|
196
217
|
```bash
|
|
@@ -243,9 +264,8 @@ Prepare your config file named **api-gen.config.json**:
|
|
|
243
264
|
|
|
244
265
|
Full changelog for stable version is available [here](https://github.com/shopware/frontends/blob/main/packages/api-gen/CHANGELOG.md)
|
|
245
266
|
|
|
246
|
-
### Latest changes: 1.
|
|
267
|
+
### Latest changes: 1.2.0
|
|
247
268
|
|
|
248
|
-
###
|
|
269
|
+
### Minor Changes
|
|
249
270
|
|
|
250
|
-
-
|
|
251
|
-
- @shopware/api-client@1.1.2
|
|
271
|
+
- [#1566](https://github.com/shopware/frontends/pull/1566) [`541cd6e`](https://github.com/shopware/frontends/commit/541cd6e5b5acaa20fb8aad699b2674e81b9330ce) Thanks [@patzick](https://github.com/patzick)! - Possibility to add multiple override json patches. Now you can use our default overrides and add your own on top of it.
|
package/bin/api-gen.mjs
CHANGED