From 99f13be65d366d6137b08dd72b9d14168ff756f8 Mon Sep 17 00:00:00 2001 From: DmitryAnansky Date: Thu, 21 Nov 2024 19:09:21 +0200 Subject: [PATCH] chore: update e2e test snapshots --- .../snapshot.js | 2 +- .../snapshot.js | 2 +- .../config-with-warn.snapshot.js | 4 ++-- .../arazzo-not-valid-test-description/snapshot.js | 4 ++-- .../redocly.yaml | 4 ++-- .../arazzo-type-extensions-with-plugin/snapshot.js | 2 +- .../snapshot.js | 2 +- .../snapshot.js | 2 +- .../snapshot.js | 2 +- __tests__/lint/null-schema-values/snapshot.js | 4 ++-- __tests__/lint/oas3.1-error/snapshot.js | 2 +- .../snapshot.js | 14 +++++++------- .../snapshot.js | 14 +++++++------- .../spec-error-if-minimum-not-correct/snapshot.js | 14 +++++++------- __tests__/lint/spec-from/snapshot.js | 6 +++--- __tests__/lint/wrong-required-type/snapshot.js | 2 +- .../default-recommended-fallback/snapshot.js | 14 +++++++------- packages/core/src/config/config.ts | 1 - 18 files changed, 47 insertions(+), 48 deletions(-) diff --git a/__tests__/check-config/wrong-config-type-extensions-in-assertions/snapshot.js b/__tests__/check-config/wrong-config-type-extensions-in-assertions/snapshot.js index fe75e0df16..eb312666fa 100644 --- a/__tests__/check-config/wrong-config-type-extensions-in-assertions/snapshot.js +++ b/__tests__/check-config/wrong-config-type-extensions-in-assertions/snapshot.js @@ -5,7 +5,7 @@ exports[`E2E check-config wrong config type extension in assertions 1`] = ` Deprecated plugin format detected: type-extension [1] redocly.yaml:10:13 at #/rules/rule~1metadata-lifecycle/subject/type -\`type\` can be one of the following only: "any", "Root", "Tag", "TagList", "TagGroups", "TagGroup", "ExternalDocs", "Example", "ExamplesMap", "EnumDescriptions", "SecurityRequirement", "SecurityRequirementList", "Info", "Contact", "License", "Logo", "Paths", "PathItem", "Parameter", "ParameterItems", "ParameterList", "Operation", "Examples", "Header", "Responses", "Response", "Schema", "Xml", "SchemaProperties", "NamedSchemas", "NamedResponses", "NamedParameters", "NamedSecuritySchemes", "SecurityScheme", "XCodeSample", "XCodeSampleList", "XServerList", "XServer", "Server", "ServerList", "ServerVariable", "ServerVariablesMap", "Callback", "CallbacksMap", "RequestBody", "MediaTypesMap", "MediaType", "Encoding", "EncodingMap", "HeadersMap", "Link", "DiscriminatorMapping", "Discriminator", "Components", "LinksMap", "NamedExamples", "NamedRequestBodies", "NamedHeaders", "NamedLinks", "NamedCallbacks", "ImplicitFlow", "PasswordFlow", "ClientCredentials", "AuthorizationCode", "OAuth2Flows", "XUsePkce", "WebhooksMap", "XMetaData", "PatternProperties", "NamedPathItems", "DependentRequired", "HttpServerBinding", "HttpChannelBinding", "HttpMessageBinding", "HttpOperationBinding", "WsServerBinding", "WsChannelBinding", "WsMessageBinding", "WsOperationBinding", "KafkaServerBinding", "KafkaTopicConfiguration", "KafkaChannelBinding", "KafkaMessageBinding", "KafkaOperationBinding", "AnypointmqServerBinding", "AnypointmqChannelBinding", "AnypointmqMessageBinding", "AnypointmqOperationBinding", "AmqpServerBinding", "AmqpChannelBinding", "AmqpMessageBinding", "AmqpOperationBinding", "Amqp1ServerBinding", "Amqp1ChannelBinding", "Amqp1MessageBinding", "Amqp1OperationBinding", "MqttServerBindingLastWill", "MqttServerBinding", "MqttChannelBinding", "MqttMessageBinding", "MqttOperationBinding", "Mqtt5ServerBinding", "Mqtt5ChannelBinding", "Mqtt5MessageBinding", "Mqtt5OperationBinding", "NatsServerBinding", "NatsChannelBinding", "NatsMessageBinding", "NatsOperationBinding", "JmsServerBinding", "JmsChannelBinding", "JmsMessageBinding", "JmsOperationBinding", "SolaceServerBinding", "SolaceChannelBinding", "SolaceMessageBinding", "SolaceDestination", "SolaceOperationBinding", "StompServerBinding", "StompChannelBinding", "StompMessageBinding", "StompOperationBinding", "RedisServerBinding", "RedisChannelBinding", "RedisMessageBinding", "RedisOperationBinding", "MercureServerBinding", "MercureChannelBinding", "MercureMessageBinding", "MercureOperationBinding", "ServerBindings", "ChannelBindings", "MessageBindings", "OperationBindings", "ServerMap", "ChannelMap", "Channel", "ParametersMap", "MessageExample", "NamedMessages", "NamedMessageTraits", "NamedOperationTraits", "NamedCorrelationIds", "SecuritySchemeFlows", "Message", "OperationTrait", "OperationTraitList", "MessageTrait", "MessageTraitList", "MessageExampleList", "CorrelationId", "Dependencies", "OperationReply", "OperationReplyAddress", "NamedTags", "NamedExternalDocs", "NamedChannels", "NamedOperations", "NamedOperationReplies", "NamedOperationRelyAddresses", "SecuritySchemeList", "MessageList", "SourceDescriptions", "OpenAPISourceDescription", "NoneSourceDescription", "ArazzoSourceDescription", "Parameters", "ReusableObject", "Workflows", "Workflow", "Steps", "Step", "Replacement", "ExtendedOperation", "ExpectSchema", "Outputs", "CriterionObject", "XPathCriterion", "JSONPathCriterion", "SuccessActionObject", "OnSuccessActionList", "FailureActionObject", "OnFailureActionList", "NamedInputs", "NamedSuccessActions", "NamedFailureActions", "SpecExtension". +\`type\` can be one of the following only: "any", "Root", "Tag", "TagList", "TagGroups", "TagGroup", "ExternalDocs", "Example", "ExamplesMap", "EnumDescriptions", "SecurityRequirement", "SecurityRequirementList", "Info", "Contact", "License", "Logo", "Paths", "PathItem", "Parameter", "ParameterItems", "ParameterList", "Operation", "Examples", "Header", "Responses", "Response", "Schema", "Xml", "SchemaProperties", "NamedSchemas", "NamedResponses", "NamedParameters", "NamedSecuritySchemes", "SecurityScheme", "XCodeSample", "XCodeSampleList", "XServerList", "XServer", "Server", "ServerList", "ServerVariable", "ServerVariablesMap", "Callback", "CallbacksMap", "RequestBody", "MediaTypesMap", "MediaType", "Encoding", "EncodingMap", "HeadersMap", "Link", "DiscriminatorMapping", "Discriminator", "Components", "LinksMap", "NamedExamples", "NamedRequestBodies", "NamedHeaders", "NamedLinks", "NamedCallbacks", "ImplicitFlow", "PasswordFlow", "ClientCredentials", "AuthorizationCode", "OAuth2Flows", "XUsePkce", "WebhooksMap", "XMetaData", "PatternProperties", "NamedPathItems", "DependentRequired", "HttpServerBinding", "HttpChannelBinding", "HttpMessageBinding", "HttpOperationBinding", "WsServerBinding", "WsChannelBinding", "WsMessageBinding", "WsOperationBinding", "KafkaServerBinding", "KafkaTopicConfiguration", "KafkaChannelBinding", "KafkaMessageBinding", "KafkaOperationBinding", "AnypointmqServerBinding", "AnypointmqChannelBinding", "AnypointmqMessageBinding", "AnypointmqOperationBinding", "AmqpServerBinding", "AmqpChannelBinding", "AmqpMessageBinding", "AmqpOperationBinding", "Amqp1ServerBinding", "Amqp1ChannelBinding", "Amqp1MessageBinding", "Amqp1OperationBinding", "MqttServerBindingLastWill", "MqttServerBinding", "MqttChannelBinding", "MqttMessageBinding", "MqttOperationBinding", "Mqtt5ServerBinding", "Mqtt5ChannelBinding", "Mqtt5MessageBinding", "Mqtt5OperationBinding", "NatsServerBinding", "NatsChannelBinding", "NatsMessageBinding", "NatsOperationBinding", "JmsServerBinding", "JmsChannelBinding", "JmsMessageBinding", "JmsOperationBinding", "SolaceServerBinding", "SolaceChannelBinding", "SolaceMessageBinding", "SolaceDestination", "SolaceOperationBinding", "StompServerBinding", "StompChannelBinding", "StompMessageBinding", "StompOperationBinding", "RedisServerBinding", "RedisChannelBinding", "RedisMessageBinding", "RedisOperationBinding", "MercureServerBinding", "MercureChannelBinding", "MercureMessageBinding", "MercureOperationBinding", "ServerBindings", "ChannelBindings", "MessageBindings", "OperationBindings", "ServerMap", "ChannelMap", "Channel", "ParametersMap", "MessageExample", "NamedMessages", "NamedMessageTraits", "NamedOperationTraits", "NamedCorrelationIds", "SecuritySchemeFlows", "Message", "OperationTrait", "OperationTraitList", "MessageTrait", "MessageTraitList", "MessageExampleList", "CorrelationId", "Dependencies", "OperationReply", "OperationReplyAddress", "NamedTags", "NamedExternalDocs", "NamedChannels", "NamedOperations", "NamedOperationReplies", "NamedOperationRelyAddresses", "SecuritySchemeList", "MessageList", "SourceDescriptions", "OpenAPISourceDescription", "ArazzoSourceDescription", "Parameters", "ReusableObject", "Workflows", "Workflow", "Steps", "Step", "Replacement", "ExtendedOperation", "ExpectSchema", "Outputs", "CriterionObject", "XPathCriterion", "JSONPathCriterion", "SuccessActionObject", "OnSuccessActionList", "FailureActionObject", "OnFailureActionList", "NamedInputs", "NamedSuccessActions", "NamedFailureActions", "SpecExtension". 8 | rule/metadata-lifecycle: 9 | subject: diff --git a/__tests__/lint-config/invalid-config-assertation-config-type/snapshot.js b/__tests__/lint-config/invalid-config-assertation-config-type/snapshot.js index d07c1737f5..b45b5c0013 100644 --- a/__tests__/lint-config/invalid-config-assertation-config-type/snapshot.js +++ b/__tests__/lint-config/invalid-config-assertation-config-type/snapshot.js @@ -6,7 +6,7 @@ exports[`E2E lint-config test with option: { dirName: 'invalid-config-assertatio The 'assert/' syntax in assert/path-item-mutually-required is deprecated. Update your configuration to use 'rule/' instead. Examples and more information: https://redocly.com/docs/cli/rules/configurable-rules/ [1] .redocly.yaml:9:17 at #/rules/assert~1path-item-mutually-required/where/0/subject/type -\`type\` can be one of the following only: "any", "Root", "Tag", "TagList", "TagGroups", "TagGroup", "ExternalDocs", "Example", "ExamplesMap", "EnumDescriptions", "SecurityRequirement", "SecurityRequirementList", "Info", "Contact", "License", "Logo", "Paths", "PathItem", "Parameter", "ParameterItems", "ParameterList", "Operation", "Examples", "Header", "Responses", "Response", "Schema", "Xml", "SchemaProperties", "NamedSchemas", "NamedResponses", "NamedParameters", "NamedSecuritySchemes", "SecurityScheme", "XCodeSample", "XCodeSampleList", "XServerList", "XServer", "Server", "ServerList", "ServerVariable", "ServerVariablesMap", "Callback", "CallbacksMap", "RequestBody", "MediaTypesMap", "MediaType", "Encoding", "EncodingMap", "HeadersMap", "Link", "DiscriminatorMapping", "Discriminator", "Components", "LinksMap", "NamedExamples", "NamedRequestBodies", "NamedHeaders", "NamedLinks", "NamedCallbacks", "ImplicitFlow", "PasswordFlow", "ClientCredentials", "AuthorizationCode", "OAuth2Flows", "XUsePkce", "WebhooksMap", "PatternProperties", "NamedPathItems", "DependentRequired", "HttpServerBinding", "HttpChannelBinding", "HttpMessageBinding", "HttpOperationBinding", "WsServerBinding", "WsChannelBinding", "WsMessageBinding", "WsOperationBinding", "KafkaServerBinding", "KafkaTopicConfiguration", "KafkaChannelBinding", "KafkaMessageBinding", "KafkaOperationBinding", "AnypointmqServerBinding", "AnypointmqChannelBinding", "AnypointmqMessageBinding", "AnypointmqOperationBinding", "AmqpServerBinding", "AmqpChannelBinding", "AmqpMessageBinding", "AmqpOperationBinding", "Amqp1ServerBinding", "Amqp1ChannelBinding", "Amqp1MessageBinding", "Amqp1OperationBinding", "MqttServerBindingLastWill", "MqttServerBinding", "MqttChannelBinding", "MqttMessageBinding", "MqttOperationBinding", "Mqtt5ServerBinding", "Mqtt5ChannelBinding", "Mqtt5MessageBinding", "Mqtt5OperationBinding", "NatsServerBinding", "NatsChannelBinding", "NatsMessageBinding", "NatsOperationBinding", "JmsServerBinding", "JmsChannelBinding", "JmsMessageBinding", "JmsOperationBinding", "SolaceServerBinding", "SolaceChannelBinding", "SolaceMessageBinding", "SolaceDestination", "SolaceOperationBinding", "StompServerBinding", "StompChannelBinding", "StompMessageBinding", "StompOperationBinding", "RedisServerBinding", "RedisChannelBinding", "RedisMessageBinding", "RedisOperationBinding", "MercureServerBinding", "MercureChannelBinding", "MercureMessageBinding", "MercureOperationBinding", "ServerBindings", "ChannelBindings", "MessageBindings", "OperationBindings", "ServerMap", "ChannelMap", "Channel", "ParametersMap", "MessageExample", "NamedMessages", "NamedMessageTraits", "NamedOperationTraits", "NamedCorrelationIds", "SecuritySchemeFlows", "Message", "OperationTrait", "OperationTraitList", "MessageTrait", "MessageTraitList", "MessageExampleList", "CorrelationId", "Dependencies", "OperationReply", "OperationReplyAddress", "NamedTags", "NamedExternalDocs", "NamedChannels", "NamedOperations", "NamedOperationReplies", "NamedOperationRelyAddresses", "SecuritySchemeList", "MessageList", "SourceDescriptions", "OpenAPISourceDescription", "NoneSourceDescription", "ArazzoSourceDescription", "Parameters", "ReusableObject", "Workflows", "Workflow", "Steps", "Step", "Replacement", "ExtendedOperation", "ExpectSchema", "Outputs", "CriterionObject", "XPathCriterion", "JSONPathCriterion", "SuccessActionObject", "OnSuccessActionList", "FailureActionObject", "OnFailureActionList", "NamedInputs", "NamedSuccessActions", "NamedFailureActions", "SpecExtension". +\`type\` can be one of the following only: "any", "Root", "Tag", "TagList", "TagGroups", "TagGroup", "ExternalDocs", "Example", "ExamplesMap", "EnumDescriptions", "SecurityRequirement", "SecurityRequirementList", "Info", "Contact", "License", "Logo", "Paths", "PathItem", "Parameter", "ParameterItems", "ParameterList", "Operation", "Examples", "Header", "Responses", "Response", "Schema", "Xml", "SchemaProperties", "NamedSchemas", "NamedResponses", "NamedParameters", "NamedSecuritySchemes", "SecurityScheme", "XCodeSample", "XCodeSampleList", "XServerList", "XServer", "Server", "ServerList", "ServerVariable", "ServerVariablesMap", "Callback", "CallbacksMap", "RequestBody", "MediaTypesMap", "MediaType", "Encoding", "EncodingMap", "HeadersMap", "Link", "DiscriminatorMapping", "Discriminator", "Components", "LinksMap", "NamedExamples", "NamedRequestBodies", "NamedHeaders", "NamedLinks", "NamedCallbacks", "ImplicitFlow", "PasswordFlow", "ClientCredentials", "AuthorizationCode", "OAuth2Flows", "XUsePkce", "WebhooksMap", "PatternProperties", "NamedPathItems", "DependentRequired", "HttpServerBinding", "HttpChannelBinding", "HttpMessageBinding", "HttpOperationBinding", "WsServerBinding", "WsChannelBinding", "WsMessageBinding", "WsOperationBinding", "KafkaServerBinding", "KafkaTopicConfiguration", "KafkaChannelBinding", "KafkaMessageBinding", "KafkaOperationBinding", "AnypointmqServerBinding", "AnypointmqChannelBinding", "AnypointmqMessageBinding", "AnypointmqOperationBinding", "AmqpServerBinding", "AmqpChannelBinding", "AmqpMessageBinding", "AmqpOperationBinding", "Amqp1ServerBinding", "Amqp1ChannelBinding", "Amqp1MessageBinding", "Amqp1OperationBinding", "MqttServerBindingLastWill", "MqttServerBinding", "MqttChannelBinding", "MqttMessageBinding", "MqttOperationBinding", "Mqtt5ServerBinding", "Mqtt5ChannelBinding", "Mqtt5MessageBinding", "Mqtt5OperationBinding", "NatsServerBinding", "NatsChannelBinding", "NatsMessageBinding", "NatsOperationBinding", "JmsServerBinding", "JmsChannelBinding", "JmsMessageBinding", "JmsOperationBinding", "SolaceServerBinding", "SolaceChannelBinding", "SolaceMessageBinding", "SolaceDestination", "SolaceOperationBinding", "StompServerBinding", "StompChannelBinding", "StompMessageBinding", "StompOperationBinding", "RedisServerBinding", "RedisChannelBinding", "RedisMessageBinding", "RedisOperationBinding", "MercureServerBinding", "MercureChannelBinding", "MercureMessageBinding", "MercureOperationBinding", "ServerBindings", "ChannelBindings", "MessageBindings", "OperationBindings", "ServerMap", "ChannelMap", "Channel", "ParametersMap", "MessageExample", "NamedMessages", "NamedMessageTraits", "NamedOperationTraits", "NamedCorrelationIds", "SecuritySchemeFlows", "Message", "OperationTrait", "OperationTraitList", "MessageTrait", "MessageTraitList", "MessageExampleList", "CorrelationId", "Dependencies", "OperationReply", "OperationReplyAddress", "NamedTags", "NamedExternalDocs", "NamedChannels", "NamedOperations", "NamedOperationReplies", "NamedOperationRelyAddresses", "SecuritySchemeList", "MessageList", "SourceDescriptions", "OpenAPISourceDescription", "ArazzoSourceDescription", "Parameters", "ReusableObject", "Workflows", "Workflow", "Steps", "Step", "Replacement", "ExtendedOperation", "ExpectSchema", "Outputs", "CriterionObject", "XPathCriterion", "JSONPathCriterion", "SuccessActionObject", "OnSuccessActionList", "FailureActionObject", "OnFailureActionList", "NamedInputs", "NamedSuccessActions", "NamedFailureActions", "SpecExtension". 7 | where: 8 | - subject: diff --git a/__tests__/lint-config/invalid-definition-and-config/config-with-warn.snapshot.js b/__tests__/lint-config/invalid-definition-and-config/config-with-warn.snapshot.js index f954d0998a..9777891125 100644 --- a/__tests__/lint-config/invalid-definition-and-config/config-with-warn.snapshot.js +++ b/__tests__/lint-config/invalid-definition-and-config/config-with-warn.snapshot.js @@ -33,7 +33,7 @@ The field \`title\` must be present on this level. 5 | description: Example description 6 | version: '1.0' -Error was generated by the spec rule. +Error was generated by the struct rule. [2] ../__fixtures__/invalid-openapi.yaml:10:5 at #/paths/~1pet~1findByStatus/get/summary @@ -60,7 +60,7 @@ Expected type \`Responses\` (object) but got \`null\` | ^^^^^^^^^^ 12 | -Error was generated by the spec rule. +Error was generated by the struct rule. [4] ../__fixtures__/invalid-openapi.yaml:4:1 at #/info diff --git a/__tests__/lint/arazzo-not-valid-test-description/snapshot.js b/__tests__/lint/arazzo-not-valid-test-description/snapshot.js index acf0992022..f3a4a359de 100644 --- a/__tests__/lint/arazzo-not-valid-test-description/snapshot.js +++ b/__tests__/lint/arazzo-not-valid-test-description/snapshot.js @@ -18,7 +18,7 @@ The field \`info\` must be present on this level. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 18 | -Error was generated by the spec rule. +Error was generated by the struct rule. [2] museum.yaml:9:5 at #/workflows/0 @@ -36,7 +36,7 @@ The field \`steps\` must be present on this level. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 18 | -Error was generated by the spec rule. +Error was generated by the struct rule. museum.yaml: validated in ms diff --git a/__tests__/lint/arazzo-type-extensions-with-plugin/redocly.yaml b/__tests__/lint/arazzo-type-extensions-with-plugin/redocly.yaml index ae54d08d69..91db16b46e 100644 --- a/__tests__/lint/arazzo-type-extensions-with-plugin/redocly.yaml +++ b/__tests__/lint/arazzo-type-extensions-with-plugin/redocly.yaml @@ -1,5 +1,5 @@ plugins: - plugins/type-extention.js -arazzoRules: - spec: error +arazzo1Rules: + struct: error diff --git a/__tests__/lint/arazzo-type-extensions-with-plugin/snapshot.js b/__tests__/lint/arazzo-type-extensions-with-plugin/snapshot.js index 8c43799e25..dfdc90ab42 100644 --- a/__tests__/lint/arazzo-type-extensions-with-plugin/snapshot.js +++ b/__tests__/lint/arazzo-type-extensions-with-plugin/snapshot.js @@ -15,7 +15,7 @@ Property \`wrong-key\` is not expected here. 9 | metadata: 10 | lifecycle: production -Error was generated by the spec rule. +Error was generated by the struct rule. museum.yaml: validated in ms diff --git a/__tests__/lint/no-enum-type-mismatch-error-recommended-config/snapshot.js b/__tests__/lint/no-enum-type-mismatch-error-recommended-config/snapshot.js index 47dc235cc6..5c71cd405f 100644 --- a/__tests__/lint/no-enum-type-mismatch-error-recommended-config/snapshot.js +++ b/__tests__/lint/no-enum-type-mismatch-error-recommended-config/snapshot.js @@ -39,7 +39,7 @@ Expected type \`array\` but got \`string\`. | ^^^^^^ 46 | -Error was generated by the spec rule. +Error was generated by the struct rule. [4] openapi.yaml:2:1 at #/info diff --git a/__tests__/lint/no-invalid-media-type-examples-invalid-schema/snapshot.js b/__tests__/lint/no-invalid-media-type-examples-invalid-schema/snapshot.js index 9d84b1e8e4..1569745716 100644 --- a/__tests__/lint/no-invalid-media-type-examples-invalid-schema/snapshot.js +++ b/__tests__/lint/no-invalid-media-type-examples-invalid-schema/snapshot.js @@ -14,7 +14,7 @@ The \`type\` field must be defined when the \`nullable\` field is used. 17 | paths: 18 | /test: -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:28:17 at #/paths/~1test/get/responses/202/content/application~1json/schema diff --git a/__tests__/lint/no-undefined-server-variable-error-recommended-config/snapshot.js b/__tests__/lint/no-undefined-server-variable-error-recommended-config/snapshot.js index 407e57fe08..70caf2fbcc 100644 --- a/__tests__/lint/no-undefined-server-variable-error-recommended-config/snapshot.js +++ b/__tests__/lint/no-undefined-server-variable-error-recommended-config/snapshot.js @@ -14,7 +14,7 @@ Expected type \`string\` but got \`null\`. 8 | description: Dev Environment. 9 | security: [] -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:2:1 at #/info diff --git a/__tests__/lint/null-schema-values/snapshot.js b/__tests__/lint/null-schema-values/snapshot.js index df0c31baf4..a88dcbfac4 100644 --- a/__tests__/lint/null-schema-values/snapshot.js +++ b/__tests__/lint/null-schema-values/snapshot.js @@ -13,7 +13,7 @@ Expected type \`Info\` (object) but got \`null\` 3 | paths: 4 | /test: -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:15:5 at #/components/schemas/EmptySchema @@ -28,7 +28,7 @@ Expected type \`Schema\` (object) but got \`null\` referenced from openapi.yaml:12:17 at #/paths/~1test/get/responses/200/content/application~1json/schema -Error was generated by the spec rule. +Error was generated by the struct rule. /openapi.yaml: validated in ms diff --git a/__tests__/lint/oas3.1-error/snapshot.js b/__tests__/lint/oas3.1-error/snapshot.js index c478166fe8..5c9a575307 100644 --- a/__tests__/lint/oas3.1-error/snapshot.js +++ b/__tests__/lint/oas3.1-error/snapshot.js @@ -16,7 +16,7 @@ Must contain at least one of the following fields: paths, components, webhooks. | ^^^^^^^^^^^^ 24 | -Error was generated by the spec rule. +Error was generated by the struct rule. /openapi.yaml: validated in ms diff --git a/__tests__/lint/operation-security-scheme-oas2-error/snapshot.js b/__tests__/lint/operation-security-scheme-oas2-error/snapshot.js index d6b32a167a..c12c6a5814 100644 --- a/__tests__/lint/operation-security-scheme-oas2-error/snapshot.js +++ b/__tests__/lint/operation-security-scheme-oas2-error/snapshot.js @@ -14,7 +14,7 @@ The field \`name\` is not allowed here. 15 | description: basic auth 16 | x-internal: true -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:22:5 at #/securityDefinitions/bearerAuth/flows @@ -30,7 +30,7 @@ Did you mean: flow ? 23 | x-internal: true 24 | testProp: test -Error was generated by the spec rule. +Error was generated by the struct rule. [3] openapi.yaml:24:5 at #/securityDefinitions/bearerAuth/testProp @@ -44,7 +44,7 @@ Property \`testProp\` is not expected here. 25 | oauthImplicit: 26 | type: oauth2 -Error was generated by the spec rule. +Error was generated by the struct rule. [4] openapi.yaml:30:5 at #/securityDefinitions/oauthImplicit/tokenUrl @@ -58,7 +58,7 @@ The field \`tokenUrl\` is not allowed here. 31 | scopes: 32 | 'write:pets': 'modify pets in your account' -Error was generated by the spec rule. +Error was generated by the struct rule. [5] openapi.yaml:40:5 at #/securityDefinitions/oauthAccessCode/name @@ -72,7 +72,7 @@ The field \`name\` is not allowed here. 41 | scopes: 42 | 'write:pets': 'modify pets in your account' -Error was generated by the spec rule. +Error was generated by the struct rule. [6] openapi.yaml:47:5 at #/securityDefinitions/oauthApplication/authorizationUrl @@ -86,7 +86,7 @@ The field \`authorizationUrl\` is not allowed here. 48 | tokenUrl: 'http://tokenUrl' 49 | description: oauth application -Error was generated by the spec rule. +Error was generated by the struct rule. [7] openapi.yaml:56:5 at #/securityDefinitions/oauthPassword/authorizationUrl @@ -100,7 +100,7 @@ The field \`authorizationUrl\` is not allowed here. 57 | tokenUrl: 'http://tokenUrl' 58 | description: oauth password -Error was generated by the spec rule. +Error was generated by the struct rule. /openapi.yaml: validated in ms diff --git a/__tests__/lint/operation-security-scheme-oas3-error/snapshot.js b/__tests__/lint/operation-security-scheme-oas3-error/snapshot.js index ad9b05a0af..bde1116bac 100644 --- a/__tests__/lint/operation-security-scheme-oas3-error/snapshot.js +++ b/__tests__/lint/operation-security-scheme-oas3-error/snapshot.js @@ -14,7 +14,7 @@ Property \`testProp\` is not expected here. 36 | tokenUrl: 'http://tokenUrl' 37 | scopes: -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:36:11 at #/components/securitySchemes/petstore_auth/flows/implicit/tokenUrl @@ -28,7 +28,7 @@ Property \`tokenUrl\` is not expected here. 37 | scopes: 38 | 'write:pets': modify pets in your account -Error was generated by the spec rule. +Error was generated by the struct rule. [3] openapi.yaml:41:11 at #/components/securitySchemes/petstore_auth/flows/password/authorizationUrl @@ -42,7 +42,7 @@ Property \`authorizationUrl\` is not expected here. 42 | tokenUrl: 'http://tokenUrl' 43 | scopes: -Error was generated by the spec rule. +Error was generated by the struct rule. [4] openapi.yaml:51:7 at #/components/securitySchemes/api_key/authorizationUrl @@ -56,7 +56,7 @@ Property \`authorizationUrl\` is not expected here. 52 | httpScheme: 53 | type: http -Error was generated by the spec rule. +Error was generated by the struct rule. [5] openapi.yaml:54:7 at #/components/securitySchemes/httpScheme/name @@ -70,7 +70,7 @@ The field \`name\` is not allowed here. 55 | in: header 56 | scheme: scheme -Error was generated by the spec rule. +Error was generated by the struct rule. [6] openapi.yaml:55:7 at #/components/securitySchemes/httpScheme/in @@ -84,7 +84,7 @@ The field \`in\` is not allowed here. 56 | scheme: scheme 57 | description: http scheme -Error was generated by the spec rule. +Error was generated by the struct rule. [7] openapi.yaml:58:7 at #/components/securitySchemes/httpScheme/authorizationUrl @@ -97,7 +97,7 @@ Property \`authorizationUrl\` is not expected here. | ^^^^^^^^^^^^^^^^ 59 | -Error was generated by the spec rule. +Error was generated by the struct rule. [8] openapi.yaml:18:5 at #/paths/~1pet~1findByStatus/get diff --git a/__tests__/lint/spec-error-if-minimum-not-correct/snapshot.js b/__tests__/lint/spec-error-if-minimum-not-correct/snapshot.js index fcbfdf0a06..aa82b64769 100644 --- a/__tests__/lint/spec-error-if-minimum-not-correct/snapshot.js +++ b/__tests__/lint/spec-error-if-minimum-not-correct/snapshot.js @@ -14,7 +14,7 @@ The value of the minItems field must be greater than or equal to 0 30 | maxItems: -3 31 | maxLength: -4 -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:30:23 at #/paths/~1pet~1findByStatus/get/parameters/0/schema/maxItems @@ -28,7 +28,7 @@ The value of the maxItems field must be greater than or equal to 0 31 | maxLength: -4 32 | minLength: -2 -Error was generated by the spec rule. +Error was generated by the struct rule. [3] openapi.yaml:31:24 at #/paths/~1pet~1findByStatus/get/parameters/0/schema/maxLength @@ -42,7 +42,7 @@ The value of the maxLength field must be greater than or equal to 0 32 | minLength: -2 33 | items: -Error was generated by the spec rule. +Error was generated by the struct rule. [4] openapi.yaml:32:24 at #/paths/~1pet~1findByStatus/get/parameters/0/schema/minLength @@ -56,7 +56,7 @@ The value of the minLength field must be greater than or equal to 0 33 | items: 34 | type: string -Error was generated by the spec rule. +Error was generated by the struct rule. [5] openapi.yaml:69:27 at #/components/schemas/Dog/allOf/0/properties/packSize/multipleOf @@ -70,7 +70,7 @@ The value of the multipleOf field must be greater than or equal to 0 70 | maxProperties: -3 71 | minProperties: -8 -Error was generated by the spec rule. +Error was generated by the struct rule. [6] openapi.yaml:70:30 at #/components/schemas/Dog/allOf/0/properties/packSize/maxProperties @@ -84,7 +84,7 @@ The value of the maxProperties field must be greater than or equal to 0 71 | minProperties: -8 72 | required: -Error was generated by the spec rule. +Error was generated by the struct rule. [7] openapi.yaml:71:30 at #/components/schemas/Dog/allOf/0/properties/packSize/minProperties @@ -98,7 +98,7 @@ The value of the minProperties field must be greater than or equal to 0 72 | required: 73 | - packSize -Error was generated by the spec rule. +Error was generated by the struct rule. [8] openapi.yaml:15:5 at #/paths/~1pet~1findByStatus/get diff --git a/__tests__/lint/spec-from/snapshot.js b/__tests__/lint/spec-from/snapshot.js index 961d45a289..c180b35796 100644 --- a/__tests__/lint/spec-from/snapshot.js +++ b/__tests__/lint/spec-from/snapshot.js @@ -16,7 +16,7 @@ The field \`paths\` must be present on this level. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 14 | -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:1:1 at #/ @@ -32,7 +32,7 @@ The field \`info\` must be present on this level. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 14 | -Error was generated by the spec rule. +Error was generated by the struct rule. [3] openapi.yaml:5:7 at #/components/requestBodies/TestRequestBody/content @@ -48,7 +48,7 @@ Property \`content\` is not expected here. referenced from openapi.yaml:13:11 at #/components/schemas/TestSchema/allOf/0 -Error was generated by the spec rule. +Error was generated by the struct rule. /openapi.yaml: validated in ms diff --git a/__tests__/lint/wrong-required-type/snapshot.js b/__tests__/lint/wrong-required-type/snapshot.js index aa5bdb0d14..3b94859405 100644 --- a/__tests__/lint/wrong-required-type/snapshot.js +++ b/__tests__/lint/wrong-required-type/snapshot.js @@ -13,7 +13,7 @@ Expected type \`array\` but got \`boolean\`. | ^^^^ 13 | -Error was generated by the spec rule. +Error was generated by the struct rule. /openapi.yaml: validated in ms diff --git a/__tests__/zero-config/default-recommended-fallback/snapshot.js b/__tests__/zero-config/default-recommended-fallback/snapshot.js index d02a182f31..cf8e9fef36 100644 --- a/__tests__/zero-config/default-recommended-fallback/snapshot.js +++ b/__tests__/zero-config/default-recommended-fallback/snapshot.js @@ -16,7 +16,7 @@ Property \`testProp\` is not expected here. 36 | tokenUrl: 'http://tokenUrl' 37 | scopes: -Error was generated by the spec rule. +Error was generated by the struct rule. [2] openapi.yaml:36:11 at #/components/securitySchemes/petstore_auth/flows/implicit/tokenUrl @@ -30,7 +30,7 @@ Property \`tokenUrl\` is not expected here. 37 | scopes: 38 | 'write:pets': modify pets in your account -Error was generated by the spec rule. +Error was generated by the struct rule. [3] openapi.yaml:41:11 at #/components/securitySchemes/petstore_auth/flows/password/authorizationUrl @@ -44,7 +44,7 @@ Property \`authorizationUrl\` is not expected here. 42 | tokenUrl: 'http://tokenUrl' 43 | scopes: -Error was generated by the spec rule. +Error was generated by the struct rule. [4] openapi.yaml:51:7 at #/components/securitySchemes/api_key/authorizationUrl @@ -58,7 +58,7 @@ Property \`authorizationUrl\` is not expected here. 52 | httpScheme: 53 | type: http -Error was generated by the spec rule. +Error was generated by the struct rule. [5] openapi.yaml:54:7 at #/components/securitySchemes/httpScheme/name @@ -72,7 +72,7 @@ The field \`name\` is not allowed here. 55 | in: header 56 | scheme: scheme -Error was generated by the spec rule. +Error was generated by the struct rule. [6] openapi.yaml:55:7 at #/components/securitySchemes/httpScheme/in @@ -86,7 +86,7 @@ The field \`in\` is not allowed here. 56 | scheme: scheme 57 | description: http scheme -Error was generated by the spec rule. +Error was generated by the struct rule. [7] openapi.yaml:58:7 at #/components/securitySchemes/httpScheme/authorizationUrl @@ -99,7 +99,7 @@ Property \`authorizationUrl\` is not expected here. | ^^^^^^^^^^^^^^^^ 59 | -Error was generated by the spec rule. +Error was generated by the struct rule. [8] openapi.yaml:18:5 at #/paths/~1pet~1findByStatus/get diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index a6ff54007d..a3afbc8dd6 100755 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -384,7 +384,6 @@ export class Config { constructor(public rawConfig: ResolvedConfig, public configFile?: string) { this.apis = rawConfig.apis || {}; this.styleguide = new StyleguideConfig(rawConfig.styleguide || {}, configFile); - console.log('this.styleguide', this.styleguide); this.theme = rawConfig.theme || {}; this.resolve = getResolveConfig(rawConfig?.resolve); this.region = rawConfig.region;