From 839486ed4609c7f4233a8e9c7e4367ce90502d14 Mon Sep 17 00:00:00 2001 From: IhorKarpiuk Date: Tue, 28 Nov 2023 10:56:12 +0200 Subject: [PATCH 1/8] chore: add deprecate warning for the lint-related options in the bundle command --- .changeset/gold-cougars-relax.md | 5 ++ __tests__/bundle/bundle-anchor/snapshot.js | 2 + .../snapshot.js | 4 ++ .../bundle-description-long/snapshot.js | 4 ++ .../checkstyle-format-snapshot.js | 4 ++ .../codeframe-format-snapshot.js | 4 ++ .../emptyFormatValue-snapshot.js | 4 ++ .../json-format-snapshot.js | 4 ++ .../noFormatParameter-snapshot.js | 4 ++ .../stylish-format-snapshot.js | 4 ++ ...thout-remove-unused-components-snapshot.js | 2 + .../oas2/remove-unused-components-snapshot.js | 2 + ...thout-remove-unused-components-snapshot.js | 2 + .../oas3/remove-unused-components-snapshot.js | 2 + .../oas2/remove-unused-components-snapshot.js | 2 + .../oas3/remove-unused-components-snapshot.js | 2 + .../snapshot.js | 2 + .../info-description-override/snapshot.js | 2 + __tests__/bundle/info-override/snapshot.js | 2 + .../bundle/max-problems-argument/snapshot.js | 4 ++ .../no-duplicated-components/snapshot.js | 2 + .../no-self-referenced-components/snapshot.js | 2 + .../snapshot.js | 2 + .../snapshot.js | 2 + .../snapshot.js | 2 + __tests__/bundle/primitive-types/snapshot.js | 2 + .../snapshot.js | 2 + .../snapshot.js | 2 + .../tag-description-override/snapshot.js | 2 + .../resolve-refs-in-preprocessors/snapshot.js | 4 ++ .../bundle-workflows/result-snapshot.js | 4 ++ __tests__/webpack-bundle/bundle/snapshot.js | 4 ++ docs/commands/bundle.md | 51 ++++++++++--------- packages/cli/src/commands/bundle.ts | 21 ++++++++ packages/cli/src/index.ts | 5 ++ 35 files changed, 145 insertions(+), 23 deletions(-) create mode 100644 .changeset/gold-cougars-relax.md diff --git a/.changeset/gold-cougars-relax.md b/.changeset/gold-cougars-relax.md new file mode 100644 index 0000000000..3dc7072eda --- /dev/null +++ b/.changeset/gold-cougars-relax.md @@ -0,0 +1,5 @@ +--- +"@redocly/cli": patch +--- + +Deprecated lint-related options in the `bundle` command. The options are going to be removed in the subsequent releases. diff --git a/__tests__/bundle/bundle-anchor/snapshot.js b/__tests__/bundle/bundle-anchor/snapshot.js index 756fb6ef14..bf1c76e9fa 100644 --- a/__tests__/bundle/bundle-anchor/snapshot.js +++ b/__tests__/bundle/bundle-anchor/snapshot.js @@ -28,6 +28,8 @@ paths: foo: TEST components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./test.yaml... ๐Ÿ“ฆ Created a bundle for ./test.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-description-dereferenced/snapshot.js b/__tests__/bundle/bundle-description-dereferenced/snapshot.js index df842b8cd2..56683bfdda 100644 --- a/__tests__/bundle/bundle-description-dereferenced/snapshot.js +++ b/__tests__/bundle/bundle-description-dereferenced/snapshot.js @@ -36,6 +36,8 @@ components: $ref: '#/components/schemas/Name' description: Other name (specific). +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./test.yaml... ๐Ÿ“ฆ Created a bundle for ./test.yaml at stdout ms. @@ -78,6 +80,8 @@ components: description: names description properties: *ref_0 +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling test.yaml... ๐Ÿ“ฆ Created a bundle for test.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-description-long/snapshot.js b/__tests__/bundle/bundle-description-long/snapshot.js index 6c60495793..e2ed4c66a5 100644 --- a/__tests__/bundle/bundle-description-long/snapshot.js +++ b/__tests__/bundle/bundle-description-long/snapshot.js @@ -18,6 +18,8 @@ info: security: [] components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./test.yaml... ๐Ÿ“ฆ Created a bundle for ./test.yaml at stdout ms. @@ -41,6 +43,8 @@ info: security: [] components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling test.yaml... ๐Ÿ“ฆ Created a bundle for test.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js b/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js index a568419ec4..d8ada5f6d7 100644 --- a/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js @@ -8,6 +8,10 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: chec +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + โŒ Validation failed with 1 error. run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. diff --git a/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js b/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js index 59659afdd3..e375008b45 100644 --- a/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js @@ -2,6 +2,10 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: codeframe 1`] = ` +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + [1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json Expected type \`MediaType\` (object) but got \`null\` diff --git a/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js b/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js index 68d6f492bc..fc602af3bf 100644 --- a/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js @@ -2,6 +2,10 @@ exports[`E2E bundle lint format bundle lint: no format parameter or empty value should be formatted as codeframe 1`] = ` +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + [1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json Expected type \`MediaType\` (object) but got \`null\` diff --git a/__tests__/bundle/bundle-lint-format/json-format-snapshot.js b/__tests__/bundle/bundle-lint-format/json-format-snapshot.js index 06aefccdec..aef5bfe2a2 100644 --- a/__tests__/bundle/bundle-lint-format/json-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/json-format-snapshot.js @@ -34,6 +34,10 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: json "version": "", "problems": [] } +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + โŒ Validation failed with 1 error. run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. diff --git a/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js b/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js index 68d6f492bc..fc602af3bf 100644 --- a/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js @@ -2,6 +2,10 @@ exports[`E2E bundle lint format bundle lint: no format parameter or empty value should be formatted as codeframe 1`] = ` +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + [1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json Expected type \`MediaType\` (object) but got \`null\` diff --git a/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js b/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js index 695b209570..1a369565b3 100644 --- a/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js @@ -2,6 +2,10 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: stylish 1`] = ` +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + openapi.yaml: 20:11 error spec Expected type \`MediaType\` (object) but got \`null\` diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js index b61fd9074f..700549e478 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js @@ -38,6 +38,8 @@ securityDefinitions: name: access_token type: apiKey +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js index 0466cad3b9..b61e8f6d82 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js @@ -14,6 +14,8 @@ definitions: ref: type: string +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 4 unused components. diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js index e918bda117..4307c0798c 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js @@ -53,6 +53,8 @@ components: schema: type: integer +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js index 14815199fc..cff9b8e50d 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js @@ -17,6 +17,8 @@ components: ref: type: string +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 6 unused components. diff --git a/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js index 2ac984e858..7244c8d0a3 100644 --- a/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js @@ -14,6 +14,8 @@ definitions: ref: type: string +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 4 unused components. diff --git a/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js index 746d09d755..a038263531 100644 --- a/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js @@ -17,6 +17,8 @@ components: ref: type: string +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 6 unused components. diff --git a/__tests__/bundle/info-description-override-error/snapshot.js b/__tests__/bundle/info-description-override-error/snapshot.js index 8d5e3e9d4c..3fe66cf393 100644 --- a/__tests__/bundle/info-description-override-error/snapshot.js +++ b/__tests__/bundle/info-description-override-error/snapshot.js @@ -2,6 +2,8 @@ exports[`E2E bundle info-description-override-error 1`] = ` +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./main.yaml... main.yaml: 8:16 error info-description-override Failed to read markdown override file for "info.description". diff --git a/__tests__/bundle/info-description-override/snapshot.js b/__tests__/bundle/info-description-override/snapshot.js index b997670053..0eb36d4eb3 100644 --- a/__tests__/bundle/info-description-override/snapshot.js +++ b/__tests__/bundle/info-description-override/snapshot.js @@ -31,6 +31,8 @@ paths: description: example description components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./main.yaml... ๐Ÿ“ฆ Created a bundle for ./main.yaml at stdout ms. diff --git a/__tests__/bundle/info-override/snapshot.js b/__tests__/bundle/info-override/snapshot.js index 91fb81235f..0d9b2e05b3 100644 --- a/__tests__/bundle/info-override/snapshot.js +++ b/__tests__/bundle/info-override/snapshot.js @@ -27,6 +27,8 @@ paths: description: example description components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./main.yaml... ๐Ÿ“ฆ Created a bundle for ./main.yaml at stdout ms. diff --git a/__tests__/bundle/max-problems-argument/snapshot.js b/__tests__/bundle/max-problems-argument/snapshot.js index 63639c20c3..9e983eac37 100644 --- a/__tests__/bundle/max-problems-argument/snapshot.js +++ b/__tests__/bundle/max-problems-argument/snapshot.js @@ -238,6 +238,10 @@ components: items: $ref: '#/components/schemas/Pet' +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + foo.yaml: 30:11 error spec Property \`header\` is not expected here. diff --git a/__tests__/bundle/no-duplicated-components/snapshot.js b/__tests__/bundle/no-duplicated-components/snapshot.js index a044e827e4..14b547f6a4 100644 --- a/__tests__/bundle/no-duplicated-components/snapshot.js +++ b/__tests__/bundle/no-duplicated-components/snapshot.js @@ -15,6 +15,8 @@ components: Test: type: object +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/no-self-referenced-components/snapshot.js b/__tests__/bundle/no-self-referenced-components/snapshot.js index a036fa20fc..b2169f3343 100644 --- a/__tests__/bundle/no-self-referenced-components/snapshot.js +++ b/__tests__/bundle/no-self-referenced-components/snapshot.js @@ -24,6 +24,8 @@ components: schema: type: string +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js b/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js index 62080a489b..fef61ef71d 100644 --- a/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js +++ b/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js @@ -7,6 +7,8 @@ components: myObject.v2.schema: type: object +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/operation-description-override-error/snapshot.js b/__tests__/bundle/operation-description-override-error/snapshot.js index 9a52cc0379..b813de9cf1 100644 --- a/__tests__/bundle/operation-description-override-error/snapshot.js +++ b/__tests__/bundle/operation-description-override-error/snapshot.js @@ -2,6 +2,8 @@ exports[`E2E bundle operation-description-override-error 1`] = ` +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... openapi.yaml: 23:7 error operation-description-override Failed to read markdown override file for operation "updatePet". diff --git a/__tests__/bundle/operation-description-override/snapshot.js b/__tests__/bundle/operation-description-override/snapshot.js index 56628ed33a..db128d0994 100644 --- a/__tests__/bundle/operation-description-override/snapshot.js +++ b/__tests__/bundle/operation-description-override/snapshot.js @@ -47,6 +47,8 @@ paths: description: ok components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/primitive-types/snapshot.js b/__tests__/bundle/primitive-types/snapshot.js index d2f057f214..4b07f23ea2 100644 --- a/__tests__/bundle/primitive-types/snapshot.js +++ b/__tests__/bundle/primitive-types/snapshot.js @@ -40,6 +40,8 @@ paths: key2: 2 components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js b/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js index 0e21318e36..e5405183d3 100644 --- a/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js +++ b/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js @@ -18,6 +18,8 @@ info: name: test 2 components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/tag-description-override-error/snapshot.js b/__tests__/bundle/tag-description-override-error/snapshot.js index 8d197842f0..a4449c73d7 100644 --- a/__tests__/bundle/tag-description-override-error/snapshot.js +++ b/__tests__/bundle/tag-description-override-error/snapshot.js @@ -2,6 +2,8 @@ exports[`E2E bundle tag-description-override-error 1`] = ` +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./main.yaml... main.yaml: 17:5 error tag-description-override Failed to read markdown override file for tag "pet". diff --git a/__tests__/bundle/tag-description-override/snapshot.js b/__tests__/bundle/tag-description-override/snapshot.js index df3a19942e..d1f37ef5b4 100644 --- a/__tests__/bundle/tag-description-override/snapshot.js +++ b/__tests__/bundle/tag-description-override/snapshot.js @@ -43,6 +43,8 @@ paths: description: example description components: {} +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./main.yaml... ๐Ÿ“ฆ Created a bundle for ./main.yaml at stdout ms. diff --git a/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js b/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js index 7cde290f38..766ed02684 100644 --- a/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js +++ b/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js @@ -52,6 +52,10 @@ components: error_code: type: number +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + [1] openapi.yaml:4:1 at #/info Info object should contain \`license\` field. diff --git a/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js b/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js index ade6a84b26..ff128ecaed 100644 --- a/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js +++ b/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js @@ -2,6 +2,10 @@ exports[`webpack-bundle test bundle-workflows 1`] = ` +[WARNING] "extends" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at bundle.yaml ms. diff --git a/__tests__/webpack-bundle/bundle/snapshot.js b/__tests__/webpack-bundle/bundle/snapshot.js index 4a2f0e0875..0b3de5e34d 100644 --- a/__tests__/webpack-bundle/bundle/snapshot.js +++ b/__tests__/webpack-bundle/bundle/snapshot.js @@ -2,6 +2,10 @@ exports[`webpack-bundle test bundle check 1`] = ` +[WARNING] "lint" option is deprecated and will be removed in the next major release. + +[WARNING] "max-problems" option is deprecated and will be removed in the next major release. + Woohoo! Your API descriptions are valid. ๐ŸŽ‰ bundling ./openapi.yaml... diff --git a/docs/commands/bundle.md b/docs/commands/bundle.md index ae5b81bd30..db90edc7db 100644 --- a/docs/commands/bundle.md +++ b/docs/commands/bundle.md @@ -12,35 +12,40 @@ The `bundle` command first executes preprocessors, then rules, then decorators. ```bash redocly bundle ... -redocly bundle [--max-problems=] -redocly bundle [--lint] [--config=] +redocly bundle [--remove-unused-components] +redocly bundle [--config=] redocly bundle ... -o --ext redocly bundle --version ``` ## Options -| Option | Type | Description | -| -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| apis | [string] | List of API description root filenames or names assigned in the `apis` section of your Redocly configuration file. Default values are all names defined in the `apis` section within your configuration file. | -| --config | string | Specify path to the [config file](#custom-configuration-file). | -| --dereferenced, -d | boolean | Generate fully dereferenced bundle. | -| --ext | string | Specify bundled file extension. Possible values are `json`, `yaml`, or `yml`. Default value is `yaml`. | -| --extends | [string] | Can be used in combination with `--lint` to [extend a specific configuration](./lint.md#extend-configuration). Default values are taken from the Redocly configuration file. | -| --force, -f | boolean | Generate bundle output even when errors occur. | -| --format | string | Format for the output. Possible values are `codeframe`, `stylish`, `json`, or `checkstyle`. Default value is `codeframe`. | -| --help | boolean | Show help. | -| --keep-url-references, -k | boolean | Keep absolute url references. | -| --lint | boolean | Lint API description files. Default value is `false`. | -| --lint-config | string | Specify the severity level for the configuration file.
**Possible values:** `warn`, `error`, `off`. Default value is `warn`. | -| --max-problems | integer | Truncate output to display the specified maximum number of problems. Default value is `100`. | -| --metafile | string | Path for the bundle metadata file. | -| --output, -o | string | Name or folder for the bundle file. If you don't specify the file extension, `.yaml` is used by default. If the specified folder doesn't exist, it's created automatically. **If the file specified as the bundler's output already exists, it's overwritten.** | -| --remove-unused-components | boolean | Remove unused components from the `bundle` output. | -| --skip-decorator | [string] | Ignore certain decorators. See the [Skip preprocessor, rule, or decorator section](#skip-preprocessor-rule-or-decorator). | -| --skip-preprocessor | [string] | Ignore certain preprocessors. See the [Skip preprocessor, rule, or decorator section](#skip-preprocessor-rule-or-decorator). | -| --skip-rule | [string] | Ignore certain rules. See the [Skip preprocessor, rule, or decorator section](#skip-preprocessor-rule-or-decorator). | -| --version | boolean | Show version number. | +{% admonition type="warning" name="Important" %} +The `--lint` option and all related options (`--extends`, `--max-problems`, `--skip-rule`, `--format`) are deprecated and will be removed in the next releases. +Please use the `lint` command instead. +{% /admonition %} + +| Option | Type | Description | +| ------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| apis | [string] | List of API description root filenames or names assigned in the `apis` section of your Redocly configuration file. Default values are all names defined in the `apis` section within your configuration file. | +| --config | string | Specify path to the [config file](#custom-configuration-file). | +| --dereferenced, -d | boolean | Generate fully dereferenced bundle. | +| --ext | string | Specify bundled file extension. Possible values are `json`, `yaml`, or `yml`. Default value is `yaml`. | +| --extends (**Deprecated**) | [string] | Can be used in combination with `--lint` to [extend a specific configuration](./lint.md#extend-configuration). Default values are taken from the Redocly configuration file. | +| --force, -f | boolean | Generate bundle output even when errors occur. | +| --format (**Deprecated**) | string | Format for the output. Possible values are `codeframe`, `stylish`, `json`, or `checkstyle`. Default value is `codeframe`. | +| --help | boolean | Show help. | +| --keep-url-references, -k | boolean | Keep absolute url references. | +| --lint (**Deprecated**) | boolean | Lint API description files. Default value is `false`. | +| --lint-config | string | Specify the severity level for the configuration file.
**Possible values:** `warn`, `error`, `off`. Default value is `warn`. | +| --max-problems (**Deprecated**) | integer | Truncate output to display the specified maximum number of problems. Default value is `100`. | +| --metafile | string | Path for the bundle metadata file. | +| --output, -o | string | Name or folder for the bundle file. If you don't specify the file extension, `.yaml` is used by default. If the specified folder doesn't exist, it's created automatically. **If the file specified as the bundler's output already exists, it's overwritten.** | +| --remove-unused-components | boolean | Remove unused components from the `bundle` output. | +| --skip-decorator | [string] | Ignore certain decorators. See the [Skip preprocessor, rule, or decorator section](#skip-preprocessor-rule-or-decorator). | +| --skip-preprocessor | [string] | Ignore certain preprocessors. See the [Skip preprocessor, rule, or decorator section](#skip-preprocessor-rule-or-decorator). | +| --skip-rule (**Deprecated**) | [string] | Ignore certain rules. See the [Skip preprocessor, rule, or decorator section](#skip-preprocessor-rule-or-decorator). | +| --version | boolean | Show version number. | ## Examples diff --git a/packages/cli/src/commands/bundle.ts b/packages/cli/src/commands/bundle.ts index 9451edc204..b3e20eb275 100644 --- a/packages/cli/src/commands/bundle.ts +++ b/packages/cli/src/commands/bundle.ts @@ -48,6 +48,8 @@ export async function handleBundle(argv: BundleOptions, config: Config, version: const totals: Totals = { errors: 0, warnings: 0, ignored: 0 }; const maxProblems = argv['max-problems']; + checkForDeprecatedOptions(argv); + for (const { path, alias } of apis) { try { const startedAt = performance.now(); @@ -175,3 +177,22 @@ export async function handleBundle(argv: BundleOptions, config: Config, version: throw new Error('Bundle failed.'); } } + +function checkForDeprecatedOptions(argv: BundleOptions) { + const deprecatedOptions: Array = [ + 'lint', + 'skip-rule', + 'extends', + 'max-problems', + ]; + + for (const option of deprecatedOptions) { + if (argv[option]) { + process.stderr.write( + yellow( + `[WARNING] "${option}" option is deprecated and will be removed in the next releases. \n\n` + ) + ); + } + } +} diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 37369c549a..85c66b00dd 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -295,12 +295,14 @@ yargs description: 'Use a specific output format.', choices: ['stylish', 'codeframe', 'json', 'checkstyle'] as ReadonlyArray, default: 'codeframe' as OutputFormat, + hidden: true, }, 'max-problems': { requiresArg: true, description: 'Reduce output to a maximum of N problems.', type: 'number', default: 100, + hidden: true, }, ext: { description: 'Bundle file extension.', @@ -311,6 +313,7 @@ yargs description: 'Ignore certain rules.', array: true, type: 'string', + hidden: true, }, 'skip-preprocessor': { description: 'Ignore certain preprocessors.', @@ -340,6 +343,7 @@ yargs description: 'Lint API descriptions', type: 'boolean', default: false, + hidden: true, }, metafile: { description: 'Produce metadata about the bundle', @@ -350,6 +354,7 @@ yargs requiresArg: true, array: true, type: 'string', + hidden: true, }, 'remove-unused-components': { description: 'Remove unused components.', From 02896ea6a7f873d6204a7eb9e6a54a9ead40b328 Mon Sep 17 00:00:00 2001 From: IhorKarpiuk Date: Tue, 28 Nov 2023 11:39:47 +0200 Subject: [PATCH 2/8] fix: remove default values --- __tests__/bundle/bundle-anchor/snapshot.js | 2 - .../snapshot.js | 4 -- .../bundle-description-long/snapshot.js | 4 -- .../checkstyle-format-snapshot.js | 6 ++- .../codeframe-format-snapshot.js | 6 ++- .../emptyFormatValue-snapshot.js | 50 +++++++++++-------- .../json-format-snapshot.js | 6 ++- .../noFormatParameter-snapshot.js | 4 +- .../stylish-format-snapshot.js | 6 ++- ...thout-remove-unused-components-snapshot.js | 2 - .../oas2/remove-unused-components-snapshot.js | 2 - ...thout-remove-unused-components-snapshot.js | 2 - .../oas3/remove-unused-components-snapshot.js | 2 - .../oas2/remove-unused-components-snapshot.js | 2 - .../oas3/remove-unused-components-snapshot.js | 2 - .../snapshot.js | 17 +++++-- .../info-description-override/snapshot.js | 2 - __tests__/bundle/info-override/snapshot.js | 2 - .../bundle/max-problems-argument/snapshot.js | 6 ++- .../no-duplicated-components/snapshot.js | 2 - .../no-self-referenced-components/snapshot.js | 2 - .../snapshot.js | 2 - .../snapshot.js | 17 +++++-- .../snapshot.js | 2 - __tests__/bundle/primitive-types/snapshot.js | 2 - .../snapshot.js | 2 - .../snapshot.js | 19 +++++-- .../tag-description-override/snapshot.js | 2 - __tests__/commands.test.ts | 1 - .../resolve-refs-in-preprocessors/snapshot.js | 4 +- .../bundle-workflows/result-snapshot.js | 4 +- __tests__/webpack-bundle/bundle/snapshot.js | 4 +- package.json | 2 +- packages/cli/src/commands/bundle.ts | 11 ++-- packages/cli/src/index.ts | 2 - 35 files changed, 102 insertions(+), 103 deletions(-) diff --git a/__tests__/bundle/bundle-anchor/snapshot.js b/__tests__/bundle/bundle-anchor/snapshot.js index bf1c76e9fa..756fb6ef14 100644 --- a/__tests__/bundle/bundle-anchor/snapshot.js +++ b/__tests__/bundle/bundle-anchor/snapshot.js @@ -28,8 +28,6 @@ paths: foo: TEST components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./test.yaml... ๐Ÿ“ฆ Created a bundle for ./test.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-description-dereferenced/snapshot.js b/__tests__/bundle/bundle-description-dereferenced/snapshot.js index 56683bfdda..df842b8cd2 100644 --- a/__tests__/bundle/bundle-description-dereferenced/snapshot.js +++ b/__tests__/bundle/bundle-description-dereferenced/snapshot.js @@ -36,8 +36,6 @@ components: $ref: '#/components/schemas/Name' description: Other name (specific). -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./test.yaml... ๐Ÿ“ฆ Created a bundle for ./test.yaml at stdout ms. @@ -80,8 +78,6 @@ components: description: names description properties: *ref_0 -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling test.yaml... ๐Ÿ“ฆ Created a bundle for test.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-description-long/snapshot.js b/__tests__/bundle/bundle-description-long/snapshot.js index e2ed4c66a5..6c60495793 100644 --- a/__tests__/bundle/bundle-description-long/snapshot.js +++ b/__tests__/bundle/bundle-description-long/snapshot.js @@ -18,8 +18,6 @@ info: security: [] components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./test.yaml... ๐Ÿ“ฆ Created a bundle for ./test.yaml at stdout ms. @@ -43,8 +41,6 @@ info: security: [] components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling test.yaml... ๐Ÿ“ฆ Created a bundle for test.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js b/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js index d8ada5f6d7..028138b4c9 100644 --- a/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js @@ -8,9 +8,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: chec -[WARNING] "lint" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "format" option is deprecated and will be removed in the next releases. + +[WARNING] "max-problems" option is deprecated and will be removed in the next releases. โŒ Validation failed with 1 error. run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. diff --git a/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js b/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js index e375008b45..d29daef4b5 100644 --- a/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js @@ -2,9 +2,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: codeframe 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "format" option is deprecated and will be removed in the next releases. + +[WARNING] "max-problems" option is deprecated and will be removed in the next releases. [1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json diff --git a/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js b/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js index fc602af3bf..104e94f411 100644 --- a/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/emptyFormatValue-snapshot.js @@ -2,27 +2,33 @@ exports[`E2E bundle lint format bundle lint: no format parameter or empty value should be formatted as codeframe 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next major release. - -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - -[1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json - -Expected type \`MediaType\` (object) but got \`null\` - -18 | requestBody: -19 | content: -20 | application/json: - | ^^^^^^^^^^^^^^^^^ -21 | - -Error was generated by the spec rule. - - -โŒ Validation failed with 1 error. -run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. - -bundling ./openapi.yaml... -๐Ÿ“ฆ Created a bundle for ./openapi.yaml at /tmp/null.yaml ms. +index.ts bundle [apis...] + +Bundle definition. + +Positionals: + apis [array] [default: []] + +Options: + --version Show version number. [boolean] + --help Show help. [boolean] + -o, --output [string] + --ext Bundle file extension. + [choices: "json", "yaml", "yml"] + --skip-preprocessor Ignore certain preprocessors. [array] + --skip-decorator Ignore certain decorators. [array] + -d, --dereferenced Produce a fully dereferenced bundle. [boolean] + -f, --force Produce bundle output even when errors occur. + [boolean] + --config Path to the config file. [string] + --metafile Produce metadata about the bundle [string] + --remove-unused-components Remove unused components. + [boolean] [default: false] + -k, --keep-url-references Keep absolute url references. [boolean] + --lint-config Severity level for config file linting. + [choices: "warn", "error", "off"] [default: "warn"] + +Invalid values: + Argument: format, Given: true, Choices: "stylish", "codeframe", "json", "checkstyle" `; diff --git a/__tests__/bundle/bundle-lint-format/json-format-snapshot.js b/__tests__/bundle/bundle-lint-format/json-format-snapshot.js index aef5bfe2a2..45d6782c0b 100644 --- a/__tests__/bundle/bundle-lint-format/json-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/json-format-snapshot.js @@ -34,9 +34,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: json "version": "", "problems": [] } -[WARNING] "lint" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "format" option is deprecated and will be removed in the next releases. + +[WARNING] "max-problems" option is deprecated and will be removed in the next releases. โŒ Validation failed with 1 error. run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. diff --git a/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js b/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js index fc602af3bf..1d9fbf351c 100644 --- a/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js @@ -2,9 +2,9 @@ exports[`E2E bundle lint format bundle lint: no format parameter or empty value should be formatted as codeframe 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "max-problems" option is deprecated and will be removed in the next releases. [1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json diff --git a/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js b/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js index 1a369565b3..d232eb0df6 100644 --- a/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js @@ -2,9 +2,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: stylish 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "format" option is deprecated and will be removed in the next releases. + +[WARNING] "max-problems" option is deprecated and will be removed in the next releases. openapi.yaml: 20:11 error spec Expected type \`MediaType\` (object) but got \`null\` diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js index 700549e478..b61fd9074f 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2-without-option/without-remove-unused-components-snapshot.js @@ -38,8 +38,6 @@ securityDefinitions: name: access_token type: apiKey -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js index b61e8f6d82..0466cad3b9 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas2/remove-unused-components-snapshot.js @@ -14,8 +14,6 @@ definitions: ref: type: string -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 4 unused components. diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js index 4307c0798c..e918bda117 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3-without-option/without-remove-unused-components-snapshot.js @@ -53,8 +53,6 @@ components: schema: type: integer -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js index cff9b8e50d..14815199fc 100644 --- a/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components-from-config/oas3/remove-unused-components-snapshot.js @@ -17,8 +17,6 @@ components: ref: type: string -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 6 unused components. diff --git a/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js index 7244c8d0a3..2ac984e858 100644 --- a/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components/oas2/remove-unused-components-snapshot.js @@ -14,8 +14,6 @@ definitions: ref: type: string -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 4 unused components. diff --git a/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js b/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js index a038263531..746d09d755 100644 --- a/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js +++ b/__tests__/bundle/bundle-remove-unused-components/oas3/remove-unused-components-snapshot.js @@ -17,8 +17,6 @@ components: ref: type: string -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. ๐Ÿงน Removed 6 unused components. diff --git a/__tests__/bundle/info-description-override-error/snapshot.js b/__tests__/bundle/info-description-override-error/snapshot.js index 3fe66cf393..cf94eacfda 100644 --- a/__tests__/bundle/info-description-override-error/snapshot.js +++ b/__tests__/bundle/info-description-override-error/snapshot.js @@ -2,13 +2,22 @@ exports[`E2E bundle info-description-override-error 1`] = ` -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./main.yaml... -main.yaml: - 8:16 error info-description-override Failed to read markdown override file for "info.description". +[1] main.yaml:8:16 at #/info/description + +Failed to read markdown override file for "info.description". ENOENT: no such file or directory, open './test.md' + 6 | title: Example OpenAPI 3 definition. + 7 | version: 1.0.0 + 8 | description: some description + | ^^^^^^^^^^^^^^^^ + 9 | license: +10 | name: Apache 2.0 + +Error was generated by the info-description-override rule. + + โŒ Errors encountered while bundling ./main.yaml: bundle not created (use --force to ignore errors). `; diff --git a/__tests__/bundle/info-description-override/snapshot.js b/__tests__/bundle/info-description-override/snapshot.js index 0eb36d4eb3..b997670053 100644 --- a/__tests__/bundle/info-description-override/snapshot.js +++ b/__tests__/bundle/info-description-override/snapshot.js @@ -31,8 +31,6 @@ paths: description: example description components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./main.yaml... ๐Ÿ“ฆ Created a bundle for ./main.yaml at stdout ms. diff --git a/__tests__/bundle/info-override/snapshot.js b/__tests__/bundle/info-override/snapshot.js index 0d9b2e05b3..91fb81235f 100644 --- a/__tests__/bundle/info-override/snapshot.js +++ b/__tests__/bundle/info-override/snapshot.js @@ -27,8 +27,6 @@ paths: description: example description components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./main.yaml... ๐Ÿ“ฆ Created a bundle for ./main.yaml at stdout ms. diff --git a/__tests__/bundle/max-problems-argument/snapshot.js b/__tests__/bundle/max-problems-argument/snapshot.js index 9e983eac37..8348b8fe5e 100644 --- a/__tests__/bundle/max-problems-argument/snapshot.js +++ b/__tests__/bundle/max-problems-argument/snapshot.js @@ -238,9 +238,11 @@ components: items: $ref: '#/components/schemas/Pet' -[WARNING] "lint" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "format" option is deprecated and will be removed in the next releases. + +[WARNING] "max-problems" option is deprecated and will be removed in the next releases. foo.yaml: 30:11 error spec Property \`header\` is not expected here. diff --git a/__tests__/bundle/no-duplicated-components/snapshot.js b/__tests__/bundle/no-duplicated-components/snapshot.js index 14b547f6a4..a044e827e4 100644 --- a/__tests__/bundle/no-duplicated-components/snapshot.js +++ b/__tests__/bundle/no-duplicated-components/snapshot.js @@ -15,8 +15,6 @@ components: Test: type: object -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/no-self-referenced-components/snapshot.js b/__tests__/bundle/no-self-referenced-components/snapshot.js index b2169f3343..a036fa20fc 100644 --- a/__tests__/bundle/no-self-referenced-components/snapshot.js +++ b/__tests__/bundle/no-self-referenced-components/snapshot.js @@ -24,8 +24,6 @@ components: schema: type: string -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js b/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js index fef61ef71d..62080a489b 100644 --- a/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js +++ b/__tests__/bundle/no-self-referenced-or-duplicated-components/snapshot.js @@ -7,8 +7,6 @@ components: myObject.v2.schema: type: object -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/operation-description-override-error/snapshot.js b/__tests__/bundle/operation-description-override-error/snapshot.js index b813de9cf1..a055c1c039 100644 --- a/__tests__/bundle/operation-description-override-error/snapshot.js +++ b/__tests__/bundle/operation-description-override-error/snapshot.js @@ -2,13 +2,22 @@ exports[`E2E bundle operation-description-override-error 1`] = ` -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... -openapi.yaml: - 23:7 error operation-description-override Failed to read markdown override file for operation "updatePet". +[1] openapi.yaml:23:7 at #/paths/~1pet/put/operationId + +Failed to read markdown override file for operation "updatePet". ENOENT: no such file or directory, open './update-pet-operation-description.md' +21 | summary: Update an existing pet +22 | description: '' +23 | operationId: updatePet + | ^^^^^^^^^^^ +24 | responses: +25 | '200': + +Error was generated by the operation-description-override rule. + + โŒ Errors encountered while bundling ./openapi.yaml: bundle not created (use --force to ignore errors). `; diff --git a/__tests__/bundle/operation-description-override/snapshot.js b/__tests__/bundle/operation-description-override/snapshot.js index db128d0994..56628ed33a 100644 --- a/__tests__/bundle/operation-description-override/snapshot.js +++ b/__tests__/bundle/operation-description-override/snapshot.js @@ -47,8 +47,6 @@ paths: description: ok components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/primitive-types/snapshot.js b/__tests__/bundle/primitive-types/snapshot.js index 4b07f23ea2..d2f057f214 100644 --- a/__tests__/bundle/primitive-types/snapshot.js +++ b/__tests__/bundle/primitive-types/snapshot.js @@ -40,8 +40,6 @@ paths: key2: 2 components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js b/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js index e5405183d3..0e21318e36 100644 --- a/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js +++ b/__tests__/bundle/resolve-refs-from-x-attributes/snapshot.js @@ -18,8 +18,6 @@ info: name: test 2 components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at stdout ms. diff --git a/__tests__/bundle/tag-description-override-error/snapshot.js b/__tests__/bundle/tag-description-override-error/snapshot.js index a4449c73d7..b9f31c2c65 100644 --- a/__tests__/bundle/tag-description-override-error/snapshot.js +++ b/__tests__/bundle/tag-description-override-error/snapshot.js @@ -2,13 +2,24 @@ exports[`E2E bundle tag-description-override-error 1`] = ` -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./main.yaml... -main.yaml: - 17:5 error tag-description-override Failed to read markdown override file for tag "pet". +[1] main.yaml:17:5 at #/tags/0 + +Failed to read markdown override file for tag "pet". ENOENT: no such file or directory, open './pet-tag-description.md' +15 | email: email@redoc.ly +16 | tags: +17 | - name: pet + | ^^^^^^^^^ +18 | description: Everything about your Pets + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +19 | - name: store +20 | description: Access to Petstore orders + +Error was generated by the tag-description-override rule. + + โŒ Errors encountered while bundling ./main.yaml: bundle not created (use --force to ignore errors). `; diff --git a/__tests__/bundle/tag-description-override/snapshot.js b/__tests__/bundle/tag-description-override/snapshot.js index d1f37ef5b4..df3a19942e 100644 --- a/__tests__/bundle/tag-description-override/snapshot.js +++ b/__tests__/bundle/tag-description-override/snapshot.js @@ -43,8 +43,6 @@ paths: description: example description components: {} -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. - bundling ./main.yaml... ๐Ÿ“ฆ Created a bundle for ./main.yaml at stdout ms. diff --git a/__tests__/commands.test.ts b/__tests__/commands.test.ts index fb67228840..a1318cd008 100644 --- a/__tests__/commands.test.ts +++ b/__tests__/commands.test.ts @@ -288,7 +288,6 @@ describe('E2E', () => { const entryPoints = getEntrypoints(testPath); const args = getParams('../../../packages/cli/src/index.ts', 'bundle', [ - '--format=stylish', ...entryPoints, ]); diff --git a/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js b/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js index 766ed02684..c90f8fa95e 100644 --- a/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js +++ b/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js @@ -52,9 +52,7 @@ components: error_code: type: number -[WARNING] "lint" option is deprecated and will be removed in the next major release. - -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. [1] openapi.yaml:4:1 at #/info diff --git a/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js b/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js index ff128ecaed..c6af58578a 100644 --- a/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js +++ b/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js @@ -2,9 +2,7 @@ exports[`webpack-bundle test bundle-workflows 1`] = ` -[WARNING] "extends" option is deprecated and will be removed in the next major release. - -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "extends" option is deprecated and will be removed in the next releases. bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at bundle.yaml ms. diff --git a/__tests__/webpack-bundle/bundle/snapshot.js b/__tests__/webpack-bundle/bundle/snapshot.js index 0b3de5e34d..c6195ccaa4 100644 --- a/__tests__/webpack-bundle/bundle/snapshot.js +++ b/__tests__/webpack-bundle/bundle/snapshot.js @@ -2,9 +2,9 @@ exports[`webpack-bundle test bundle check 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next major release. +[WARNING] "lint" option is deprecated and will be removed in the next releases. -[WARNING] "max-problems" option is deprecated and will be removed in the next major release. +[WARNING] "max-problems" option is deprecated and will be removed in the next releases. Woohoo! Your API descriptions are valid. ๐ŸŽ‰ diff --git a/package.json b/package.json index b54c314d08..27e4a52196 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "coverage:cli": "npm run jest -- --roots packages/cli/src --coverage", "coverage:core": "npm run jest -- --roots packages/core/src --coverage", "typecheck": "tsc --noEmit --skipLibCheck", - "e2e": "npm run webpack-bundle -- --mode=none && REDOCLY_TELEMETRY=off jest --roots=./__tests__/", + "e2e": "npm run webpack-bundle -- --mode=none && REDOCLY_TELEMETRY=off jest -u --roots=./__tests__/", "prettier": "npx prettier --write \"**/*.{ts,js,yaml,json,md}\"", "prettier:check": "npx prettier --check \"**/*.{ts,js,yaml,json,md}\"", "eslint": "eslint packages/**", diff --git a/packages/cli/src/commands/bundle.ts b/packages/cli/src/commands/bundle.ts index b3e20eb275..27eaf43dfa 100644 --- a/packages/cli/src/commands/bundle.ts +++ b/packages/cli/src/commands/bundle.ts @@ -26,10 +26,10 @@ import { writeFileSync } from 'fs'; export type BundleOptions = { apis?: string[]; - 'max-problems': number; + 'max-problems'?: number; extends?: string[]; config?: string; - format: OutputFormat; + format?: OutputFormat; output?: string; ext: OutputExtensions; dereferenced?: boolean; @@ -83,7 +83,7 @@ export async function handleBundle(argv: BundleOptions, config: Config, version: format: argv.format || 'codeframe', totals: fileLintTotals, version, - maxProblems, + maxProblems: maxProblems || 100, }); printLintTotals(fileLintTotals, 2); } @@ -124,8 +124,8 @@ export async function handleBundle(argv: BundleOptions, config: Config, version: totals.ignored += fileTotals.ignored; formatProblems(problems, { - format: argv.format, - maxProblems, + format: argv.format || 'codeframe', + maxProblems: maxProblems || 1, totals: fileTotals, version, }); @@ -181,6 +181,7 @@ export async function handleBundle(argv: BundleOptions, config: Config, version: function checkForDeprecatedOptions(argv: BundleOptions) { const deprecatedOptions: Array = [ 'lint', + 'format', 'skip-rule', 'extends', 'max-problems', diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 85c66b00dd..a8daeae33a 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -294,14 +294,12 @@ yargs format: { description: 'Use a specific output format.', choices: ['stylish', 'codeframe', 'json', 'checkstyle'] as ReadonlyArray, - default: 'codeframe' as OutputFormat, hidden: true, }, 'max-problems': { requiresArg: true, description: 'Reduce output to a maximum of N problems.', type: 'number', - default: 100, hidden: true, }, ext: { From c5137629a2ecd2a2eec4635011964c0ee1f96607 Mon Sep 17 00:00:00 2001 From: IhorKarpiuk Date: Tue, 28 Nov 2023 11:50:09 +0200 Subject: [PATCH 3/8] chore: run prettier --- __tests__/commands.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/__tests__/commands.test.ts b/__tests__/commands.test.ts index a1318cd008..61e96d0b89 100644 --- a/__tests__/commands.test.ts +++ b/__tests__/commands.test.ts @@ -287,9 +287,7 @@ describe('E2E', () => { const entryPoints = getEntrypoints(testPath); - const args = getParams('../../../packages/cli/src/index.ts', 'bundle', [ - ...entryPoints, - ]); + const args = getParams('../../../packages/cli/src/index.ts', 'bundle', [...entryPoints]); it(file, () => { const result = getCommandOutput(args, testPath); From da9681db0896d66eaab41275d929064757b0f064 Mon Sep 17 00:00:00 2001 From: IhorKarpiuk Date: Tue, 28 Nov 2023 14:40:31 +0200 Subject: [PATCH 4/8] chore: rremove unused code --- package.json | 2 +- packages/cli/src/commands/bundle.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 27e4a52196..b54c314d08 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "coverage:cli": "npm run jest -- --roots packages/cli/src --coverage", "coverage:core": "npm run jest -- --roots packages/core/src --coverage", "typecheck": "tsc --noEmit --skipLibCheck", - "e2e": "npm run webpack-bundle -- --mode=none && REDOCLY_TELEMETRY=off jest -u --roots=./__tests__/", + "e2e": "npm run webpack-bundle -- --mode=none && REDOCLY_TELEMETRY=off jest --roots=./__tests__/", "prettier": "npx prettier --write \"**/*.{ts,js,yaml,json,md}\"", "prettier:check": "npx prettier --check \"**/*.{ts,js,yaml,json,md}\"", "eslint": "eslint packages/**", diff --git a/packages/cli/src/commands/bundle.ts b/packages/cli/src/commands/bundle.ts index 27eaf43dfa..bbc5cde9c9 100644 --- a/packages/cli/src/commands/bundle.ts +++ b/packages/cli/src/commands/bundle.ts @@ -83,7 +83,7 @@ export async function handleBundle(argv: BundleOptions, config: Config, version: format: argv.format || 'codeframe', totals: fileLintTotals, version, - maxProblems: maxProblems || 100, + maxProblems: maxProblems, }); printLintTotals(fileLintTotals, 2); } @@ -125,7 +125,7 @@ export async function handleBundle(argv: BundleOptions, config: Config, version: formatProblems(problems, { format: argv.format || 'codeframe', - maxProblems: maxProblems || 1, + maxProblems: maxProblems, totals: fileTotals, version, }); From e0e76a91bd5754ae09c6a2e9c313f43254a81681 Mon Sep 17 00:00:00 2001 From: Ihor Karpiuk <106662428+IgorKarpiuk@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:33:51 +0200 Subject: [PATCH 5/8] Update docs/commands/bundle.md Co-authored-by: Lorna Jane Mitchell --- docs/commands/bundle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commands/bundle.md b/docs/commands/bundle.md index db90edc7db..e4ea51f6cc 100644 --- a/docs/commands/bundle.md +++ b/docs/commands/bundle.md @@ -21,7 +21,7 @@ redocly bundle --version ## Options {% admonition type="warning" name="Important" %} -The `--lint` option and all related options (`--extends`, `--max-problems`, `--skip-rule`, `--format`) are deprecated and will be removed in the next releases. +The `--lint` option and all related options (`--extends`, `--max-problems`, `--skip-rule`, `--format`) are deprecated and are marked for removal in future releases. Please use the `lint` command instead. {% /admonition %} From 90688e20ab4c8e31261c04cc0ec012fc19f6e541 Mon Sep 17 00:00:00 2001 From: Ihor Karpiuk <106662428+IgorKarpiuk@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:34:12 +0200 Subject: [PATCH 6/8] Update docs/commands/bundle.md Co-authored-by: Lorna Jane Mitchell --- docs/commands/bundle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commands/bundle.md b/docs/commands/bundle.md index e4ea51f6cc..e7791d68e1 100644 --- a/docs/commands/bundle.md +++ b/docs/commands/bundle.md @@ -22,7 +22,7 @@ redocly bundle --version {% admonition type="warning" name="Important" %} The `--lint` option and all related options (`--extends`, `--max-problems`, `--skip-rule`, `--format`) are deprecated and are marked for removal in future releases. -Please use the `lint` command instead. + Use the [lint command](./lint/md) separately to lint your APIs before bundling. {% /admonition %} | Option | Type | Description | From 1ecad7d6b77ad112f7fa50730603a5cb0036e330 Mon Sep 17 00:00:00 2001 From: Ihor Karpiuk <106662428+IgorKarpiuk@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:34:22 +0200 Subject: [PATCH 7/8] Update packages/cli/src/commands/bundle.ts Co-authored-by: Lorna Jane Mitchell --- packages/cli/src/commands/bundle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/commands/bundle.ts b/packages/cli/src/commands/bundle.ts index bbc5cde9c9..060f5f4886 100644 --- a/packages/cli/src/commands/bundle.ts +++ b/packages/cli/src/commands/bundle.ts @@ -191,7 +191,7 @@ function checkForDeprecatedOptions(argv: BundleOptions) { if (argv[option]) { process.stderr.write( yellow( - `[WARNING] "${option}" option is deprecated and will be removed in the next releases. \n\n` + `[WARNING] "${option}" option is deprecated and will be removed in a future release. \n\n` ) ); } From 5e3234bc1c68b04c0e2a23736dc33982e2f797ea Mon Sep 17 00:00:00 2001 From: IhorKarpiuk Date: Wed, 29 Nov 2023 10:53:53 +0200 Subject: [PATCH 8/8] fix: update docs and snapshots --- .changeset/gold-cougars-relax.md | 1 + .../bundle/bundle-lint-format/checkstyle-format-snapshot.js | 6 +++--- .../bundle/bundle-lint-format/codeframe-format-snapshot.js | 6 +++--- __tests__/bundle/bundle-lint-format/json-format-snapshot.js | 6 +++--- .../bundle/bundle-lint-format/noFormatParameter-snapshot.js | 4 ++-- .../bundle/bundle-lint-format/stylish-format-snapshot.js | 6 +++--- __tests__/bundle/max-problems-argument/snapshot.js | 6 +++--- .../miscellaneous/resolve-refs-in-preprocessors/snapshot.js | 2 +- .../webpack-bundle/bundle-workflows/result-snapshot.js | 2 +- __tests__/webpack-bundle/bundle/snapshot.js | 4 ++-- docs/commands/bundle.md | 4 ++-- 11 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.changeset/gold-cougars-relax.md b/.changeset/gold-cougars-relax.md index 3dc7072eda..d5bd0f89d8 100644 --- a/.changeset/gold-cougars-relax.md +++ b/.changeset/gold-cougars-relax.md @@ -3,3 +3,4 @@ --- Deprecated lint-related options in the `bundle` command. The options are going to be removed in the subsequent releases. +Use the [lint command](https://redocly.com/docs/cli/commands/lint/) separately to lint your APIs before bundling. diff --git a/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js b/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js index 028138b4c9..a0cf2f97df 100644 --- a/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/checkstyle-format-snapshot.js @@ -8,11 +8,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: chec -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. -[WARNING] "format" option is deprecated and will be removed in the next releases. +[WARNING] "format" option is deprecated and will be removed in a future release. -[WARNING] "max-problems" option is deprecated and will be removed in the next releases. +[WARNING] "max-problems" option is deprecated and will be removed in a future release. โŒ Validation failed with 1 error. run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. diff --git a/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js b/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js index d29daef4b5..62223964c9 100644 --- a/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/codeframe-format-snapshot.js @@ -2,11 +2,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: codeframe 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. -[WARNING] "format" option is deprecated and will be removed in the next releases. +[WARNING] "format" option is deprecated and will be removed in a future release. -[WARNING] "max-problems" option is deprecated and will be removed in the next releases. +[WARNING] "max-problems" option is deprecated and will be removed in a future release. [1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json diff --git a/__tests__/bundle/bundle-lint-format/json-format-snapshot.js b/__tests__/bundle/bundle-lint-format/json-format-snapshot.js index 45d6782c0b..7400a51fc5 100644 --- a/__tests__/bundle/bundle-lint-format/json-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/json-format-snapshot.js @@ -34,11 +34,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: json "version": "", "problems": [] } -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. -[WARNING] "format" option is deprecated and will be removed in the next releases. +[WARNING] "format" option is deprecated and will be removed in a future release. -[WARNING] "max-problems" option is deprecated and will be removed in the next releases. +[WARNING] "max-problems" option is deprecated and will be removed in a future release. โŒ Validation failed with 1 error. run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file. diff --git a/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js b/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js index 1d9fbf351c..608e899808 100644 --- a/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/noFormatParameter-snapshot.js @@ -2,9 +2,9 @@ exports[`E2E bundle lint format bundle lint: no format parameter or empty value should be formatted as codeframe 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. -[WARNING] "max-problems" option is deprecated and will be removed in the next releases. +[WARNING] "max-problems" option is deprecated and will be removed in a future release. [1] openapi.yaml:20:11 at #/paths/~1my_post/post/requestBody/content/application~1json diff --git a/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js b/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js index d232eb0df6..31c559b6c9 100644 --- a/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js +++ b/__tests__/bundle/bundle-lint-format/stylish-format-snapshot.js @@ -2,11 +2,11 @@ exports[`E2E bundle lint format bundle lint: should be formatted by format: stylish 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. -[WARNING] "format" option is deprecated and will be removed in the next releases. +[WARNING] "format" option is deprecated and will be removed in a future release. -[WARNING] "max-problems" option is deprecated and will be removed in the next releases. +[WARNING] "max-problems" option is deprecated and will be removed in a future release. openapi.yaml: 20:11 error spec Expected type \`MediaType\` (object) but got \`null\` diff --git a/__tests__/bundle/max-problems-argument/snapshot.js b/__tests__/bundle/max-problems-argument/snapshot.js index 8348b8fe5e..b1b75d279b 100644 --- a/__tests__/bundle/max-problems-argument/snapshot.js +++ b/__tests__/bundle/max-problems-argument/snapshot.js @@ -238,11 +238,11 @@ components: items: $ref: '#/components/schemas/Pet' -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. -[WARNING] "format" option is deprecated and will be removed in the next releases. +[WARNING] "format" option is deprecated and will be removed in a future release. -[WARNING] "max-problems" option is deprecated and will be removed in the next releases. +[WARNING] "max-problems" option is deprecated and will be removed in a future release. foo.yaml: 30:11 error spec Property \`header\` is not expected here. diff --git a/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js b/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js index c90f8fa95e..bfac771727 100644 --- a/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js +++ b/__tests__/miscellaneous/resolve-refs-in-preprocessors/snapshot.js @@ -52,7 +52,7 @@ components: error_code: type: number -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. [1] openapi.yaml:4:1 at #/info diff --git a/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js b/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js index c6af58578a..f924c58a1a 100644 --- a/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js +++ b/__tests__/webpack-bundle/bundle-workflows/result-snapshot.js @@ -2,7 +2,7 @@ exports[`webpack-bundle test bundle-workflows 1`] = ` -[WARNING] "extends" option is deprecated and will be removed in the next releases. +[WARNING] "extends" option is deprecated and will be removed in a future release. bundling ./openapi.yaml... ๐Ÿ“ฆ Created a bundle for ./openapi.yaml at bundle.yaml ms. diff --git a/__tests__/webpack-bundle/bundle/snapshot.js b/__tests__/webpack-bundle/bundle/snapshot.js index c6195ccaa4..9f5dbe4e79 100644 --- a/__tests__/webpack-bundle/bundle/snapshot.js +++ b/__tests__/webpack-bundle/bundle/snapshot.js @@ -2,9 +2,9 @@ exports[`webpack-bundle test bundle check 1`] = ` -[WARNING] "lint" option is deprecated and will be removed in the next releases. +[WARNING] "lint" option is deprecated and will be removed in a future release. -[WARNING] "max-problems" option is deprecated and will be removed in the next releases. +[WARNING] "max-problems" option is deprecated and will be removed in a future release. Woohoo! Your API descriptions are valid. ๐ŸŽ‰ diff --git a/docs/commands/bundle.md b/docs/commands/bundle.md index e7791d68e1..6643e4e824 100644 --- a/docs/commands/bundle.md +++ b/docs/commands/bundle.md @@ -21,8 +21,8 @@ redocly bundle --version ## Options {% admonition type="warning" name="Important" %} -The `--lint` option and all related options (`--extends`, `--max-problems`, `--skip-rule`, `--format`) are deprecated and are marked for removal in future releases. - Use the [lint command](./lint/md) separately to lint your APIs before bundling. +The `--lint` switch and all related options (`--extends`, `--max-problems`, `--skip-rule`, `--format`) are deprecated and are marked for removal in future releases. +Use the [lint command](./lint.md) separately to lint your APIs before bundling. {% /admonition %} | Option | Type | Description |