diff --git a/app/_data/products/insomnia.yml b/app/_data/products/insomnia.yml index 74c128616d..dc50512415 100644 --- a/app/_data/products/insomnia.yml +++ b/app/_data/products/insomnia.yml @@ -43,4 +43,6 @@ releases: version: "12.5.0" - release: "12.6" version: "12.6.0" - latest: true \ No newline at end of file + - release: "13.0" + version: "13.0.0" + latest: true diff --git a/app/_data/schemas/frontmatter/base.json b/app/_data/schemas/frontmatter/base.json index 754f9261f7..e2e7bfbe6d 100644 --- a/app/_data/schemas/frontmatter/base.json +++ b/app/_data/schemas/frontmatter/base.json @@ -73,8 +73,23 @@ "tags": { "type": "array", "items": { "$ref": "schema:tags" } + }, + "tier": { + "type": "string" + }, + "tiers": { + "type": "object", + "patternProperties": { + "^[a-z][a-z0-9-]*$": { + "type": "string" + } + }, + "additionalProperties": false } }, + "not": { + "required": ["tier", "tiers"] + }, "if": { "properties": { "products": { diff --git a/app/_how-tos/insomnia/add-custom-linting-rules.md b/app/_how-tos/insomnia/add-custom-linting-rules.md index ee8fbfad2d..6976a945bc 100644 --- a/app/_how-tos/insomnia/add-custom-linting-rules.md +++ b/app/_how-tos/insomnia/add-custom-linting-rules.md @@ -1,51 +1,51 @@ --- -title: Add custom linting rules in Insomnia +title: "Add custom linting rules in {{ site.data.products.insomnia.name }}" permalink: /how-to/add-custom-linting-rules/ content_type: how_to -description: Learn how to add custom linting rules to your APIs in Insomnia. +description: Learn how to add custom linting rules to your APIs in Insomnia . +no_wrap: true products: -- insomnia + - insomnia +min_version: + insomnia: "13.0" tags: - insomnia-documents - linting related_resources: - - text: Design APIs with Insomnia + - text: "Design APIs with {{ site.data.products.insomnia.name }}" url: /insomnia/design/ - -tldr: - q: How do I customize linting in Insomnia? - a: In your Git repository, add a `.spectral.yaml` file containing your custom ruleset at the same directory as the OAS file to lint. +tldr: + q: How do I customize linting in {{ site.data.products.insomnia.name }} ? + a: In your {{ site.data.products.insomnia.name }} document, click the upload icon for the **Default OAS Ruleset** and add a Spectral ruleset YAML file with your custom ruleset. prereqs: inline: - title: Create a design document include_content: prereqs/design-document icon_url: /assets/icons/file.svg - - title: Synchronize with Git - include_content: prereqs/git-sync - icon_url: /assets/icons/git.svg faqs: - q: How can I use custom linting with Inso CLI? a: | - Create your `.spectral.yaml` file in the same directory as the OAS file to lint, then run the [`inso lint spec`](/inso-cli/reference/lint_spec/) command. + Create a [Spectral ruleset](https://docs.stoplight.io/docs/spectral/e5b9616d6d50c-rulesets) in YAML format, and upload it to an OAS file document in Insomnia by clicking the upload icon for the **Default OAS Ruleset**. --- -## Create add the file ruleset - -In the Git repository connected to your document, create a `.spectral.yaml` at the same directory as the OAS file to lint. +{{ site.data.products.insomnia.name }} provides a default linting ruleset. Override it to add your custom linting rules by following these steps: ## Define the rules -The custom ruleset overrides the default one. If you want to create a completely new ruleset, you can simply add your rules in the file using the [Spectral](https://docs.stoplight.io/docs/spectral/e5b9616d6d50c-rulesets) syntax. If you want to extend an existing ruleset, specify the ruleset with the `extend` property in `.spectral.yaml`. +The custom ruleset overrides the default one. To create a new ruleset, add your rules in the file using the [Spectral](https://docs.stoplight.io/docs/spectral/e5b9616d6d50c-rulesets) syntax. If you want to extend an existing ruleset, specify the ruleset with the `extends` property. + +{:.info} +> Available Spectral top level properties in {{ site.data.products.insomnia.name }} are `rules` and `extends`. Custom functions are not permitted. However, {{ site.data.products.insomnia.name }} provides support for [Spectral built-in core functions](https://docs.stoplight.io/docs/spectral/cb95cf0d26b83-core-functions). -For example, if you want to extend the default [Spectral OpenAPI](https://docs.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules) ruleset to add a warning when tags don't have a description, you can add the following content to `.spectral.yaml`: +For example, to extend the default [Spectral OpenAPI](https://docs.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules) ruleset to add a warning when tags don't have a description, add the following content to your ruleset file: ```yaml extends: spectral:oas @@ -59,20 +59,65 @@ rules: function: truthy ``` -## Synchronize the changes +## Upload the ruleset file -Commit and push the file on the repository, then pull the changes in Insomnia. +1. In the {{ site.data.products.insomnia.name }} app, navigate to a document with the OAS file you want to lint. +2. Click the upload icon for **Default OAS Ruleset** at the bottom of the pane. -{:.info} -> This will place the `.spectral.yaml` file in the local working directory. You will not see the file in the Insomnia UI but the linting rules will be applied to the associated OAS file. +This places the ruleset file in the local working directory. {{ site.data.products.insomnia.name }} renames this custom ruleset as `.spectral.yaml`. + +You can view the content of the file by clicking `Custom Ruleset` in {{ site.data.products.insomnia.name }}. If you want to make changes to the file, edit it locally. ## Validate -Close and reopen the document to apply the changes. In this example, you can validate by creating a new tag without a description: +In this example, you can confirm the rule triggers by removing the description for the `GET /flights` endpoint. This will be flagged since the ruleset doesn't allow tags without a description: + ```yaml -tags: - - name: flight-data +"/flights": + get: + summary: Get KongAir planned flights + tags: + - flight-data ``` This causes a new warning to appear: -![Missing tag description warning](/assets/images/insomnia/custom-linting-warning.png) + +``` +tag-description Tags must have a description. +``` + +## Override the rules {% new_in 13 %} + +Override the linting rules and use another ruleset, by using either Inso CLI or `.spectral.yaml`: + +{% navtabs "custom linting" %} +{% navtab "Inso CLI" %} + +Use the [Inso CLI(/inso-cli/reference/lint_spec/) with the `--ruleset` or `-r` flag and the path to your custom ruleset. Run `inso lint spec --ruleset `. This overrides the default OpenAPI specifications (OAS) ruleset in {{ site.data.products.insomnia.name }} , and any ruleset in the API Spec folder. + +If the `--ruleset` flag isn't specified, {{ site.data.products.insomnia.name }} uses one of the following, in order: + +- The ruleset defined in `.spectral.yaml`, if it exists. +- The default OAS ruleset. + +{% endnavtab %} +{% navtab "Use `extends` in `.spectral.yaml`" %} + +Make {{ site.data.products.insomnia.name }} point at another ruleset in `.spectral.yaml` by using the `extends` property. For example: + +```yaml +extends: + - spectral:oas + - ./rules/my-rules.yaml +``` + +If you reference a remote file (one hosted outside of your project in {{ site.data.products.insomnia.name }}), {{ site.data.products.insomnia.name }} fetches its content only when you upload the custom ruleset. If the remote file later changes, {{ site.data.products.insomnia.name }}: + +- Doesn't track those changes in commits, because the file lives outside the project. +- Doesn't fetch them automatically for security reasons. Instead, you can refresh manually using the button next to the ruleset option. + +{% endnavtab %} +{% endnavtabs %} + +{:.warning} +> Make sure users in your team are running at least {{ site.data.products.insomnia.name }} `13.0` to avoid compatibility issues with this feature. \ No newline at end of file diff --git a/app/_includes/components/prereqs.html b/app/_includes/components/prereqs.html index 66496874fa..8827fd2626 100644 --- a/app/_includes/components/prereqs.html +++ b/app/_includes/components/prereqs.html @@ -124,9 +124,8 @@ {% endif %} {% if prereqs.entities? %} - {% if product == 'operator' %}{% assign product='kic' %}{% endif %} -
- {% assign prereq_path = "prereqs/entities/" | append: product | append: ".md" %} +
+ {% assign prereq_path = "prereqs/entities/" | append: prereqs.entities_product | append: ".md" %} {% include {{ prereq_path }} data=prereqs.data %}
{% endif %} diff --git a/app/_includes/components/prereqs.md b/app/_includes/components/prereqs.md index af9018035c..3fbcbc6e2f 100644 --- a/app/_includes/components/prereqs.md +++ b/app/_includes/components/prereqs.md @@ -71,8 +71,7 @@ {% include prereqs/operator/konnect_network.md config=prereqs.operator.konnect %} {%- endif -%} {%- if prereqs.entities? -%} -{%- if product == 'operator' %}{% assign product='kic' %}{% endif %} -{%- assign prereq_path = "prereqs/entities/" | append: product | append: ".md" -%} +{%- assign prereq_path = "prereqs/entities/" | append: prereqs.entities_product | append: ".md" -%} {% include {{ prereq_path }} data=prereqs.data %} {%- endif -%} {%- for prereq in prereqs.inline_without_position %} diff --git a/app/_includes/landing_pages/header.md b/app/_includes/landing_pages/header.md index 62aad9b1a5..5f353cd06e 100644 --- a/app/_includes/landing_pages/header.md +++ b/app/_includes/landing_pages/header.md @@ -12,6 +12,9 @@
{% if page.tier %} {% include tier.html products=page.products tier=page.tier %} + {% endif %} + {% if page.tiers %} + {% include tier.html products=page.products tiers=page.tiers %} {% endif %} {%- if page.beta == true or page.tech_preview == true -%} {%- include_cached badges/stage.html beta=page.beta tech_preview=page.tech_preview -%} diff --git a/app/_includes/layouts/main.html b/app/_includes/layouts/main.html index 4b0ca43a21..a5e6e1d8e1 100644 --- a/app/_includes/layouts/main.html +++ b/app/_includes/layouts/main.html @@ -2,6 +2,7 @@ {%- if layout.uses == false and page.beta == true -%}{%- assign show_badges = true -%}{%- endif -%} {%- if layout.uses == false and page.tech_preview == true -%}{%- assign show_badges = true -%}{%- endif -%} {%- if layout.tier_inline == true and page.tier -%}{%- assign show_badges = true -%}{%- endif -%} +{%- if layout.tier_inline == true and page.tiers -%}{%- assign show_badges = true -%}{%- endif -%} {%- if page.premium_partner or page.third_party -%}{%- assign show_badges = true -%}{%- endif %}
@@ -17,6 +18,9 @@

{{ page.title | liquify }} {% if layout.tier_inline == true and page.tier %} {% include tier.html products=page.products tier=page.tier %} {% endif %} + {% if layout.tier_inline == true and page.tiers %} + {% include tier.html products=page.products tiers=page.tiers %} + {% endif %} {% if layout.uses == false %} {%- if page.beta == true or page.tech_preview == true -%} @@ -43,7 +47,7 @@

{{ page.title | liquify }} {% endif %} {% if layout.uses != false %} - {% include_cached uses.html products=page.products tools=page.tools tier=page.tier beta=page.beta tech_preview=page.tech_preview %} + {% include_cached uses.html products=page.products tools=page.tools tier=page.tier tiers=page.tiers beta=page.beta tech_preview=page.tech_preview %} {% endif %} {% ifhascontent nav_header %} diff --git a/app/_includes/tier.html b/app/_includes/tier.html index 7f27acb36f..8f8f754bdd 100644 --- a/app/_includes/tier.html +++ b/app/_includes/tier.html @@ -1,20 +1,48 @@ {% unless page.plugin? %} -{% if include.products and include.products.size > 1 %} -{% raise "tier.html include called with a tier and more than one product." %} +{% if include.tier and include.tiers %} +{% raise "tier.html: page `{{page.url}}` sets both `tier` and `tiers`. Use one or the other." %} +{% endif %} +{% if include.tier and include.products and include.products.size > 1 %} +{% raise "tier.html: page `{{page.url}}` sets `tier` with more than one product. Use `tiers:` to map each product to its tier." %} {% endif %} {% endunless %} -{% assign product = include.products.first %} -{% assign tier = site.data.products[product].tiers[include.tier] %} -{% unless tier %} - {%- capture available_tiers -%} - {%- for tier in site.data.products[product].tiers -%}{{tier[0]}}{% unless forloop.last %}, {% endunless %}{%- endfor -%} - {%- endcapture -%} - {% raise "tier.html: invalid tier `{{include.tier}}` for product: `{{product}}`. Available tiers: {{available_tiers}}" %} -{% endunless %} +{% if include.tier %} + {% assign product = include.products.first %} + {% assign tier_data = site.data.products[product].tiers[include.tier] %} + {% unless tier_data %} + {%- capture available_tiers -%} + {%- for t in site.data.products[product].tiers -%}{{t[0]}}{% unless forloop.last %}, {% endunless %}{%- endfor -%} + {%- endcapture -%} + {% raise "tier.html: invalid tier `{{include.tier}}` for product: `{{product}}`. Available tiers: {{available_tiers}}" %} + {% endunless %} + + {% if include.url %} + {% include badge.html url=tier_data.url text=tier_data.text css_class=include.tier %} + {% else %} + {% include badge.html text=tier_data.text css_class=include.tier %} + {% endif %} +{% elsif include.tiers %} + {% for pair in include.tiers %} + {% assign tier_product = pair[0] %} + {% assign tier_name = pair[1] %} -{% if include.url %} -{% include badge.html url=tier.url text=tier.text css_class=include.tier %} -{% else %} -{% include badge.html text=tier.text css_class=include.tier %} -{% endif %} \ No newline at end of file + {% unless include.products contains tier_product %} + {% raise "tier.html: product `{{tier_product}}` listed in `tiers` is not present in `products` for page `{{page.url}}`." %} + {% endunless %} + + {% assign tier_data = site.data.products[tier_product].tiers[tier_name] %} + {% unless tier_data %} + {%- capture available_tiers -%} + {%- for t in site.data.products[tier_product].tiers -%}{{t[0]}}{% unless forloop.last %}, {% endunless %}{%- endfor -%} + {%- endcapture -%} + {% raise "tier.html: invalid tier `{{tier_name}}` for product: `{{tier_product}}`. Available tiers: {{available_tiers}}" %} + {% endunless %} + + {% if include.url %} + {% include badge.html url=tier_data.url text=tier_data.text css_class=tier_name %} + {% else %} + {% include badge.html text=tier_data.text css_class=tier_name %} + {% endif %} + {% endfor %} +{% endif %} diff --git a/app/_includes/uses.html b/app/_includes/uses.html index 3cf1bcb4a5..6bd7f6a0af 100644 --- a/app/_includes/uses.html +++ b/app/_includes/uses.html @@ -1,4 +1,4 @@ -{% if include.products or include.tools or include.tier or include.beta == true or include.tech_preview == true %} +{% if include.products or include.tools or include.tier or include.tiers or include.beta == true or include.tech_preview == true %}
{%- if include.beta == true or include.tech_preview == true -%} {%- include_cached badges/stage.html beta=include.beta tech_preview=include.tech_preview -%} @@ -7,8 +7,11 @@ {% if include.tier %} {% include tier.html products=include.products tier=include.tier %} {% endif %} + {% if include.tiers %} + {% include tier.html products=include.products tiers=include.tiers %} + {% endif %} - {% if include.tier or include.beta == true or include.tech_preview == true %} + {% if include.tier or include.tiers or include.beta == true or include.tech_preview == true %} {% if include.products or include.tools %} and uses: {% endif %} diff --git a/app/_plugins/drops/prereqs.rb b/app/_plugins/drops/prereqs.rb index 6fd499eb98..cb7d3aec0c 100644 --- a/app/_plugins/drops/prereqs.rb +++ b/app/_plugins/drops/prereqs.rb @@ -68,11 +68,16 @@ def inline @inline ||= prereqs.fetch('inline', []) end - def data - product = @page.data.fetch('products', [])[0] + def entities_product + @entities_product ||= begin + product = prereqs['entities_product'] || @page.data.fetch('products', [])[0] + product = 'kic' if product == 'operator' + product + end + end - # Use KIC rendering for Operator for now - product = 'kic' if product == 'operator' + def data + product = entities_product yaml = {} yaml = { '_format_version' => '3.0' } if product == 'gateway' diff --git a/app/_plugins/generators/data/llm_metadata.rb b/app/_plugins/generators/data/llm_metadata.rb index bb96633c20..599cf1b672 100644 --- a/app/_plugins/generators/data/llm_metadata.rb +++ b/app/_plugins/generators/data/llm_metadata.rb @@ -37,6 +37,7 @@ def frontmatter 'ai_gateway_enterprise' => @page.data['ai_gateway_enterprise'], 'min_version' => @page.data['min_version'], 'tier' => @page.data['tier'], + 'tiers' => resolve_tiers(@page.data['tiers']), 'products' => resolve_names(@page.data['products'], 'products'), 'tools' => resolve_names(@page.data['tools'], 'tools'), 'beta' => @page.data['beta'] @@ -56,6 +57,15 @@ def resolve_names(slugs, data_key) Array(slugs).map { |slug| @site.data.dig(data_key, slug, 'name') || slug } end + def resolve_tiers(tiers) + return if tiers.nil? || tiers.empty? + + tiers.each_with_object({}) do |(product, tier_name), out| + name = @site.data.dig('products', product, 'name') || product + out[name] = @site.data.dig('products', product, 'tiers', tier_name, 'text') || tier_name + end + end + def plugin_metadata if @page.data['plugin?'] && @page.data['overview?'] { diff --git a/app/_references/inso-cli/reference/13.0/export.md b/app/_references/inso-cli/reference/13.0/export.md new file mode 100644 index 0000000000..e486bac428 --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/export.md @@ -0,0 +1,25 @@ +--- +title: export +--- + +## Command Description + +Export data from insomnia models + +## Syntax + +`export [options] [command]` + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + +## Subcommands + +- [`export spec`](/inso-cli/reference/export_spec/{{page.release}}/): Export an API Specification to a file, identifier can be an API Spec id + diff --git a/app/_references/inso-cli/reference/13.0/export_spec.md b/app/_references/inso-cli/reference/13.0/export_spec.md new file mode 100644 index 0000000000..a21f6a696e --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/export_spec.md @@ -0,0 +1,26 @@ +--- +title: export spec +--- + +## Command Description + +Export an API Specification to a file, identifier can be an API Spec id + +## Syntax + +`export spec [options] [identifier]` + +## Local Flags + +- `-o, --output `: save the generated config to a file +- `-s, --skipAnnotations`: remove all "x-kong-" annotations, defaults to false + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + diff --git a/app/_references/inso-cli/reference/13.0/generate-docs.md b/app/_references/inso-cli/reference/13.0/generate-docs.md new file mode 100644 index 0000000000..4822b9d961 --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/generate-docs.md @@ -0,0 +1,21 @@ +--- +title: generate-docs +--- + +## Command Description + + + +## Syntax + +`generate-docs [options]` + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + diff --git a/app/_references/inso-cli/reference/13.0/index.md b/app/_references/inso-cli/reference/13.0/index.md new file mode 100644 index 0000000000..9933b10103 --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/index.md @@ -0,0 +1,41 @@ +--- +title: CLI Documentation +--- + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + + + +## Commands + +- [`run`](/inso-cli/reference/run/{{page.release}}/): Execution utilities +- [`lint`](/inso-cli/reference/lint/{{page.release}}/): Lint a yaml file in the workingDir or the provided file path (with .spectral.yml) or a spec in an Insomnia database directory +- [`export`](/inso-cli/reference/export/{{page.release}}/): Export data from insomnia models +- [`script`](/inso-cli/reference/script/{{page.release}}/): Run scripts defined in .insorc +- [`generate-docs`](/inso-cli/reference/generate-docs/{{page.release}}/): No description available + +## Subcommands + +- [`run test`](/inso-cli/reference/run_test/{{page.release}}/): Run Insomnia unit test suites, identifier can be a test suite id or a API Spec id +- [`run collection`](/inso-cli/reference/run_collection/{{page.release}}/): Run Insomnia request collection, identifier can be a workspace id + + +## Subcommands + +- [`lint spec`](/inso-cli/reference/lint_spec/{{page.release}}/): Lint an API Specification, identifier can be an API Spec id or a file path + + +## Subcommands + +- [`export spec`](/inso-cli/reference/export_spec/{{page.release}}/): Export an API Specification to a file, identifier can be an API Spec id + + + + diff --git a/app/_references/inso-cli/reference/13.0/lint.md b/app/_references/inso-cli/reference/13.0/lint.md new file mode 100644 index 0000000000..d3ebca5ef9 --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/lint.md @@ -0,0 +1,25 @@ +--- +title: lint +--- + +## Command Description + +Lint a yaml file in the workingDir or the provided file path (with .spectral.yml) or a spec in an Insomnia database directory + +## Syntax + +`lint [options] [command]` + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + +## Subcommands + +- [`lint spec`](/inso-cli/reference/lint_spec/{{page.release}}/): Lint an API Specification, identifier can be an API Spec id or a file path + diff --git a/app/_references/inso-cli/reference/13.0/lint_spec.md b/app/_references/inso-cli/reference/13.0/lint_spec.md new file mode 100644 index 0000000000..7efca421dc --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/lint_spec.md @@ -0,0 +1,25 @@ +--- +title: lint spec +--- + +## Command Description + +Lint an API Specification, identifier can be an API Spec id or a file path + +## Syntax + +`lint spec [options] [identifier]` + +## Local Flags + +- `-r, --ruleset `: path to a Spectral ruleset file, overrides default OAS ruleset and any ruleset in the API Spec folder + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + diff --git a/app/_references/inso-cli/reference/13.0/run.md b/app/_references/inso-cli/reference/13.0/run.md new file mode 100644 index 0000000000..3c11a9817e --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/run.md @@ -0,0 +1,26 @@ +--- +title: run +--- + +## Command Description + +Execution utilities + +## Syntax + +`run [options] [command]` + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + +## Subcommands + +- [`run test`](/inso-cli/reference/run_test/{{page.release}}/): Run Insomnia unit test suites, identifier can be a test suite id or a API Spec id +- [`run collection`](/inso-cli/reference/run_collection/{{page.release}}/): Run Insomnia request collection, identifier can be a workspace id + diff --git a/app/_references/inso-cli/reference/13.0/run_collection.md b/app/_references/inso-cli/reference/13.0/run_collection.md new file mode 100644 index 0000000000..d26188f46c --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/run_collection.md @@ -0,0 +1,43 @@ +--- +title: run collection +--- + +## Command Description + +Run Insomnia request collection, identifier can be a workspace id + +## Syntax + +`run collection [options] [identifier]` + +## Local Flags + +- `-t, --requestNamePattern `: run requests that match the regex +- `-i, --item `: request or folder id to run +- `-e, --env `: environment to use +- `-g, --globals `: global environment to use (filepath or id) +- `--delay-request `: milliseconds to delay between requests +- `--requestTimeout `: milliseconds before request times out +- `--env-var `: override environment variables +- `-n, --iteration-count `: number of times to repeat +- `-d, --iteration-data `: file path or url (JSON or CSV) +- `-r, --reporter `: reporter to use, options are [dot, list, min, progress, spec, tap] +- `-b, --bail`: abort ("bail") after first non-200 response +- `--disableCertValidation`: disable certificate validation for requests with SSL +- `--httpsProxy `: URL for the proxy server for https requests. +- `--httpProxy `: URL for the proxy server for http requests. +- `--noProxy `: Comma separated list of hostnames that do not require a proxy to get reached, even if one is specified. +- `-f, --dataFolders [dataFolders...]`: This allows you to control what folders Insomnia (and scripts within Insomnia) can read/write to. +- `--output `: Output the results to a file in JSON format. +- `--includeFullData `: Include full data in the output file, including request, response, environment and etc. +- `--acceptRisk`: Accept the security warning when outputting to a file, please make sure you understand the risks. + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + diff --git a/app/_references/inso-cli/reference/13.0/run_test.md b/app/_references/inso-cli/reference/13.0/run_test.md new file mode 100644 index 0000000000..1f90658891 --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/run_test.md @@ -0,0 +1,35 @@ +--- +title: run test +--- + +## Command Description + +Run Insomnia unit test suites, identifier can be a test suite id or a API Spec id + +## Syntax + +`run test [options] [identifier]` + +## Local Flags + +- `-e, --env `: environment to use +- `-t, --testNamePattern `: run tests that match the regex +- `-r, --reporter `: reporter to use, options are [dot, list, min, progress, spec, tap] +- `-b, --bail`: abort ("bail") after first test failure +- `--keepFile`: do not delete the generated test file +- `--requestTimeout `: milliseconds before request times out +- `-k, --disableCertValidation`: disable certificate validation for requests with SSL +- `--httpsProxy `: URL for the proxy server for https requests. +- `--httpProxy `: URL for the proxy server for http requests. +- `--noProxy `: Comma separated list of hostnames that do not require a proxy to get reached, even if one is specified. +- `-f, --dataFolders [dataFolders...]`: This allows you to control what folders Insomnia (and scripts within Insomnia) can read/write to. + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + diff --git a/app/_references/inso-cli/reference/13.0/script.md b/app/_references/inso-cli/reference/13.0/script.md new file mode 100644 index 0000000000..f84edd2133 --- /dev/null +++ b/app/_references/inso-cli/reference/13.0/script.md @@ -0,0 +1,21 @@ +--- +title: script +--- + +## Command Description + +Run scripts defined in .insorc + +## Syntax + +`script [options] ` + +## Global Flags + +- `-v, --version`: output the version number +- `-w, --workingDir `: set working directory/file: .insomnia folder, *.db.json, export.yaml +- `--verbose`: show additional logs while running the command +- `--ci`: run in CI, disables all prompts, defaults to false +- `--config `: path to configuration file containing above options (.insorc) +- `--printOptions`: print the loaded options + diff --git a/app/assets/images/insomnia/custom-linting-warning.png b/app/assets/images/insomnia/custom-linting-warning.png deleted file mode 100644 index d4e9380771..0000000000 Binary files a/app/assets/images/insomnia/custom-linting-warning.png and /dev/null differ diff --git a/app/insomnia/api-specs.md b/app/insomnia/api-specs.md index c113b44bd4..1991efe1e9 100644 --- a/app/insomnia/api-specs.md +++ b/app/insomnia/api-specs.md @@ -123,8 +123,8 @@ rows:
For more information, see the [`inso lint spec` reference](/inso-cli/reference/lint_spec/). - usecase: Use custom linting to ensure your spec adheres to your team or company's standards instructions: | - To lint locally, create a `.spectral.yaml` file with the custom rules in the same directory as the `oas.yaml` file you want to lint. Then run `inso lint spec ./oas.yaml` from that directory.

- To [apply custom lint rules in the Insomnia UI](/how-to/add-custom-linting-rules/), add the `.spectral.yaml` file to the root of the collection git repository at the same level as the `.insomnia` folder. + To lint locally, create a YAML file in the project with the custom rules in the same directory as the `oas.yaml` file you want to lint. The Inso CLI picks the rules regardless of the file name. Then run `inso lint spec ./oas.yaml` from that directory.

+ To [apply custom lint rules in the Insomnia UI](/how-to/add-custom-linting-rules/), upload a ruleset YAML file to the project that contains the design document you want to lint. {% endtable %} ### Work with requests diff --git a/app/insomnia/release-policy.md b/app/insomnia/release-policy.md index f65489829e..5ed5485027 100644 --- a/app/insomnia/release-policy.md +++ b/app/insomnia/release-policy.md @@ -35,11 +35,13 @@ Public documentation updates support the latest versions of Insomnia. ## Release types - **Generally Available (GA)**: Released to all users. -- **Beta**: A 7-day period before GA when users can opt in to test the release and provide early feedback. Opt in via **Settings > Release Channel** in the Insomnia app. +- **Beta**: A 7-day period before GA when users can opt in to test the release and provide early feedback. - **Preview** or **Tech Preview**: Features that are ready to use but still in active development. Preview features are clearly marked in the product. Learn more about stages of software availability [on the dedicated page](/stages-of-software-availability/). +To try the **Beta** release, opt in via **Settings > Release Channel** in the Insomnia app. This setting lets you switch between **Beta** and **GA** versions. Beta versions can include breaking changes that aren't backward compatible. + {:.info} > Insomnia strongly recommends using the newest version, and that all users collaborating on the same project remain on the same major version.