Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.39k stars 1.94k forks source link

Linter erroneously complains "operation must have non-empty tags array" #6932

Open Stokestack opened 9 months ago

Stokestack commented 9 months ago

Expected Behavior

Operation definitions don't need tags. If you look at the OpenAPI 3.1 spec, you can see that tags is not marked as required for an Operation Object.

Actual Behavior

The editor flags operations that don't have tags.

whyTagsNeeded

Reproduction Steps

Open any OAS 3.1 (don't know if the version matters) document that has operations defined without tags.

I'll paste the YAML for one in "additional information."

Is there an existing issue for this?

Additional Information

openapi: 3.1.0 info: version: 1.0.0 title: MediaDevice API description: for the discovery and control of networked media devices termsOfService: 'http://localhost:8080/api-docs' contact: name: Development team email: test@nowhere.com servers:

Insomnia Version

Version: Insomnia 8.4.5 Build date: 11/23/2023 OS: Darwin x64 20.6.0 Electron: 27.0.3 Node: 18.17.1 Node ABI: 118 V8: 11.8.172.16-electron.0 Architecture: x64

What operating system are you using?

macOS

Operating System Version

11.7.10

Installation method

Download from main Web site

Last Known Working Insomnia version

No response

pprivately commented 1 month ago

What is happening with this problem?

Insomnia complains on such Swagger 2.0 API definition: "/holdings/accounts/{arrangementId}/accountDetails" : { "get" : { "tags" : [ ], "summary" : "Retrieves the details of an account", "description" : "Retrieves the details of an account-This API is deprecated and going forward the following URL has to be used.URL:/holdings/arrangements/{arrangementId}", "operationId" : "getArrangementDetails", "produces" : [ "application/json" ], "parameters" : [ { "name" : "arrangementId", "in" : "path", "description" : "Indicates an unique identifier of an account", "required" : true, "type" : "string" }, { "name" : "page_size", "in" : "query", "description" : "The total number of records per page", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "page_start", "in" : "query", "description" : "The record from which the response should be displayed", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "page_token", "in" : "query", "description" : "Unique id expected to get as part of response from Transact on every enquiry request", "required" : false, "type" : "string" }, { "name" : "credentials", "in" : "header", "description" : "Username and password to authenticate the API against core-banking.", "required" : false, "type" : "string" }, { "name" : "companyId", "in" : "header", "description" : "Identifier of the lead company of the underlying Entity/Company/Branch for the respective contract for customer data protection purposes. Example US0010001.", "required" : false, "type" : "string" }, { "name" : "deviceId", "in" : "header", "description" : "Identifies the device type", "required" : false, "type" : "string" }, { "name" : "userRole", "in" : "header", "description" : "User who initiated the transaction", "required" : false, "type" : "string" }, { "name" : "disablePagination", "in" : "header", "description" : "Indicates the pagination header attributes availability. If set to 'true', it fetches all the data", "required" : false, "type" : "boolean" } ], "responses" : { "200" : { "description" : "ArrangementDetailsResponse", "schema" : { "$ref" : "#/definitions/ArrangementDetailsResponse" } }, "default" : { "description" : "QueryErrorResponse", "schema" : { "$ref" : "#/definitions/QueryErrorResponse" } }, "400" : { "description" : "BusinessQueryErrorResponse", "schema" : { "$ref" : "#/definitions/BusinessQueryErrorResponse" } }, "500" : { "description" : "SystemQueryErrorResponse", "schema" : { "$ref" : "#/definitions/SystemQueryErrorResponse" } } }, "deprecated" : true } }, "/holdings/accounts/{accountId}/statements/dates" : { "get" : { "tags" : [ "RETAIL" ], "summary" : "Retrieves the previously generated statement details for the given account", "description" : "Retrieves the previously generated statement details for the given account such as statement date, frequency, detailed statement and lead or participant account", "operationId" : "getPastStatements", "produces" : [ "application/json" ], "parameters" : [ { "name" : "accountId", "in" : "path", "description" : "Identifier of the account. Often referred to as the account number, yet for consistency this is always referred to as accountId. Accepts both IBAN & BBAN", "required" : true, "type" : "string" }, { "name" : "customer", "in" : "query", "description" : "Contains the customer identifier to fetch list of consent arrangements for the customer or customer identifier of the debtor account. This will be populated once the SCA(Strong Customer Authentication) is completed.", "required" : false, "type" : "string" }, { "name" : "carrierAddressId", "in" : "query", "description" : "Specifies the Carrier by which the message was received", "required" : false, "type" : "string" }, { "name" : "page_size", "in" : "query", "description" : "The total number of records per page", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "page_start", "in" : "query", "description" : "The record from which the response should be displayed", "required" : false, "type" : "integer", "format" : "int32" }, { "name" : "page_token", "in" : "query", "description" : "Unique id expected to get as part of response from Transact on every enquiry request", "required" : false, "type" : "string" }, { "name" : "credentials", "in" : "header", "description" : "Username and password to authenticate the API against core-banking.", "required" : false, "type" : "string" }, { "name" : "companyId", "in" : "header", "description" : "Identifier of the lead company of the underlying Entity/Company/Branch for the respective contract for customer data protection purposes. Example US0010001.", "required" : false, "type" : "string" }, { "name" : "deviceId", "in" : "header", "description" : "Identifies the device type", "required" : false, "type" : "string" }, { "name" : "userRole", "in" : "header", "description" : "User who initiated the transaction", "required" : false, "type" : "string" }, { "name" : "disablePagination", "in" : "header", "description" : "Indicates the pagination header attributes availability. If set to 'true', it fetches all the data", "required" : false, "type" : "boolean" } ], "responses" : { "200" : { "description" : "PastStatementsResponse", "schema" : { "$ref" : "#/definitions/PastStatementsResponse" } }, "default" : { "description" : "QueryErrorResponse", "schema" : { "$ref" : "#/definitions/QueryErrorResponse" } }, "400" : { "description" : "BusinessQueryErrorResponse", "schema" : { "$ref" : "#/definitions/BusinessQueryErrorResponse" } }, "500" : { "description" : "SystemQueryErrorResponse", "schema" : { "$ref" : "#/definitions/SystemQueryErrorResponse" } } } } }, with error "operation-tag-defined Operation tags must be defined in global tags." It seems to complain on empty "tags" : [ ],. Tested in Insomnia 9.3.3, Windows.

Postman is not complaning. Are you going to fix it?