@shopware/api-gen 1.1.0 → 1.1.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/README.md +2 -31
- package/dist/cli.mjs +7 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -243,37 +243,8 @@ Prepare your config file named **api-gen.config.json**:
|
|
|
243
243
|
|
|
244
244
|
Full changelog for stable version is available [here](https://github.com/shopware/frontends/blob/main/packages/api-gen/CHANGELOG.md)
|
|
245
245
|
|
|
246
|
-
### Latest changes: 1.1.
|
|
247
|
-
|
|
248
|
-
### Minor Changes
|
|
249
|
-
|
|
250
|
-
- [#1405](https://github.com/shopware/frontends/pull/1405) [`f9fb243`](https://github.com/shopware/frontends/commit/f9fb243d56d05a66ca4efd277c137e2ae8967f7b) Thanks [@patzick](https://github.com/patzick)! - Updated openapi-typescript to v7. Additional checks for better generation
|
|
251
|
-
|
|
252
|
-
- [#1365](https://github.com/shopware/frontends/pull/1365) [`6abe9ab`](https://github.com/shopware/frontends/commit/6abe9abb64b9d2fe94d565393b1c08ec68b58162) Thanks [@patzick](https://github.com/patzick)! - `validateJson` command now checks endpoints exposed by the API to show if there are any endpoints missing in the schema or the schema contains some endpoints definitions, which are not exposed by the backend instance
|
|
253
|
-
|
|
254
|
-
tun it in the console like this:
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
shopware-api-gen validateJson --apiType=store
|
|
258
|
-
|
|
259
|
-
shopware-api-gen validateJson --apiType=admin
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
You need to have the same .env variables as needed for `loadSchema` command as the CLI is checking endpoints against the running instance.
|
|
246
|
+
### Latest changes: 1.1.1
|
|
263
247
|
|
|
264
248
|
### Patch Changes
|
|
265
249
|
|
|
266
|
-
- [
|
|
267
|
-
|
|
268
|
-
- [#1304](https://github.com/shopware/frontends/pull/1304) [`183eee9`](https://github.com/shopware/frontends/commit/183eee90e855269251f32145711c9b284b0f2aa4) Thanks [@mkucmus](https://github.com/mkucmus)! - Fix import [pitfall](https://github.com/dotenv-org/examples/blob/master/usage/dotenv-es6-import-pitfall/invalid.mjs).
|
|
269
|
-
|
|
270
|
-
- [#1330](https://github.com/shopware/frontends/pull/1330) [`2fdb986`](https://github.com/shopware/frontends/commit/2fdb9861a2ed2b89e28bec170c3a080d470d6210) Thanks [@mkucmus](https://github.com/mkucmus)! - Avoid schema loading when internal value `_DELETE_` is used for `$ref` key.
|
|
271
|
-
|
|
272
|
-
**parse** function of `json5` library tries to load a `$ref` by loading a file under the reference value, and that's why
|
|
273
|
-
|
|
274
|
-
> _ENOENT: no such file or directory, open '{cwd}/\_DELETE_'\_
|
|
275
|
-
|
|
276
|
-
error was being thrown when there was no `_DELETE_` schema available locally (in the same json schema).
|
|
277
|
-
|
|
278
|
-
- Updated dependencies [[`6abe9ab`](https://github.com/shopware/frontends/commit/6abe9abb64b9d2fe94d565393b1c08ec68b58162), [`0643174`](https://github.com/shopware/frontends/commit/06431743162c088d46cf1e6305332bd51542eec4), [`266bb32`](https://github.com/shopware/frontends/commit/266bb32e119d7e1b3df7e082fb0fe4b0a475af44), [`f9fb243`](https://github.com/shopware/frontends/commit/f9fb243d56d05a66ca4efd277c137e2ae8967f7b), [`15bebee`](https://github.com/shopware/frontends/commit/15bebee0daefacc078ac99fea8725b95fdbc1cc7), [`ebb10eb`](https://github.com/shopware/frontends/commit/ebb10eba629b3ec2c5a4a50fa12ef0b134601d6f)]:
|
|
279
|
-
- @shopware/api-client@1.1.0
|
|
250
|
+
- [`b550cef`](https://github.com/shopware/frontends/commit/b550ceffac00f23a533d4f3913d2a801d3892c69) Thanks [@patzick](https://github.com/patzick)! - Fix process failing on errors to give more time for adoption.
|
package/dist/cli.mjs
CHANGED
|
@@ -207439,7 +207439,7 @@ function displayPatchingSummary({
|
|
|
207439
207439
|
alreadyApliedPatches,
|
|
207440
207440
|
errors
|
|
207441
207441
|
}) {
|
|
207442
|
-
if (todosToFix.length) {
|
|
207442
|
+
if (!errors?.length && todosToFix.length) {
|
|
207443
207443
|
console.log(c$1.yellow("Warnings to fix in the schema:"));
|
|
207444
207444
|
todosToFix.forEach((todo) => {
|
|
207445
207445
|
console.log(`${c$1.yellow("WARNING")}: ${todo[0]}`);
|
|
@@ -207726,7 +207726,7 @@ function runTransformations(schemaObject) {
|
|
|
207726
207726
|
}
|
|
207727
207727
|
|
|
207728
207728
|
const name = "@shopware/api-gen";
|
|
207729
|
-
const version = "1.1.
|
|
207729
|
+
const version = "1.1.1";
|
|
207730
207730
|
const description = "Shopware CLI for API client generation.";
|
|
207731
207731
|
const author = "Shopware";
|
|
207732
207732
|
const type = "module";
|
|
@@ -208168,7 +208168,11 @@ async function validateJson(args) {
|
|
|
208168
208168
|
console.error(
|
|
208169
208169
|
c$1.red(`Validation failed with ${c$1.bold(errors.length)} errors.`)
|
|
208170
208170
|
);
|
|
208171
|
-
|
|
208171
|
+
console.warn(
|
|
208172
|
+
c$1.yellow(
|
|
208173
|
+
"Errors found! This command will start failing in the future. Fix the errors from summary. Bypassing process fail for now."
|
|
208174
|
+
)
|
|
208175
|
+
);
|
|
208172
208176
|
} else {
|
|
208173
208177
|
console.log(c$1.green("\u2714\uFE0F Validation passed successfully."));
|
|
208174
208178
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware/api-gen",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Shopware CLI for API client generation.",
|
|
5
5
|
"author": "Shopware",
|
|
6
6
|
"type": "module",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"picocolors": "1.0.1",
|
|
36
36
|
"unbuild": "2.0.0",
|
|
37
37
|
"vitest": "2.1.4",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"tsconfig": "0.0.0",
|
|
39
|
+
"eslint-config-shopware": "1.0.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"ofetch": "1.4.1",
|