Skip to content

Commit 0a66d8d

Browse files
andriimredoclytatomyr
authored andcommitted
refactor: use same output method for commands (#2036)
* refactor/print-lint-output-to-stdout * Update snaphosts * refactor: use the same output for stats command
1 parent 81f19a6 commit 0a66d8d

File tree

120 files changed

+261
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+261
-249
lines changed

__tests__/bundle/bundle-external-value/snapshot.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ paths:
3232
type: object
3333
externalValue: ./external-value.json
3434
components: {}
35-
36-
bundling test-success.yaml...
37-
📦 Created a bundle for test-success.yaml at stdout <test>ms.
38-
bundling test-wrong-examples.yaml...
3935
[1] test-wrong-examples.yaml:27:17 at #/paths/~1/post/requestBody/content/application~1xml/examples/test-wrong-ref
4036

4137
Can't resolve $ref: ENOENT: no such file or directory './__tests__/bundle/bundle-external-value/external-value-bad-path.json'
@@ -51,4 +47,8 @@ Can't resolve $ref: ENOENT: no such file or directory './__tests__/bundle/bundle
5147
Error was generated by the bundler rule.
5248

5349

50+
51+
bundling test-success.yaml...
52+
📦 Created a bundle for test-success.yaml at stdout <test>ms.
53+
bundling test-wrong-examples.yaml...
5454
❌ Errors encountered while bundling test-wrong-examples.yaml: bundle not created (use --force to ignore errors).

__tests__/bundle/info-description-override-error/snapshot.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
bundling main.yaml...
31
[1] main.yaml:8:16 at #/info/description
42

53
Failed to read markdown override file for "info.description".
@@ -15,4 +13,6 @@ ENOENT: no such file or directory, open './test.md'
1513
Error was generated by the info-description-override rule.
1614

1715

16+
17+
bundling main.yaml...
1818
❌ Errors encountered while bundling main.yaml: bundle not created (use --force to ignore errors).

__tests__/bundle/operation-description-override-error/snapshot.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
bundling openapi.yaml...
31
[1] openapi.yaml:23:7 at #/paths/~1pet/put/operationId
42

53
Failed to read markdown override file for operation "updatePet".
@@ -15,4 +13,6 @@ ENOENT: no such file or directory, open './update-pet-operation-description.md'
1513
Error was generated by the operation-description-override rule.
1614

1715

16+
17+
bundling openapi.yaml...
1818
❌ Errors encountered while bundling openapi.yaml: bundle not created (use --force to ignore errors).

__tests__/bundle/tag-description-override-error/snapshot.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
bundling main.yaml...
31
[1] main.yaml:17:5 at #/tags/0
42

53
Failed to read markdown override file for tag "pet".
@@ -17,4 +15,6 @@ ENOENT: no such file or directory, open './pet-tag-description.md'
1715
Error was generated by the tag-description-override rule.
1816

1917

18+
19+
bundling main.yaml...
2020
❌ Errors encountered while bundling main.yaml: bundle not created (use --force to ignore errors).

__tests__/check-config/invalid-config--lint-config-error/snapshot.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[1] .redocly.yaml:6:3 at #/rules/context
32

43
Property `context` is not expected here.
@@ -12,5 +11,6 @@ Property `context` is not expected here.
1211
Error was generated by the configuration spec rule.
1312

1413

14+
1515
❌ Your config has 1 error.
1616

__tests__/check-config/invalid-config--lint-config-warn/snapshot.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[1] .redocly.yaml:6:3 at #/rules/context
32

43
Property `context` is not expected here.
@@ -12,4 +11,5 @@ Property `context` is not expected here.
1211
Warning was generated by the configuration spec rule.
1312

1413

14+
1515
⚠️ Your config has 1 warning.

__tests__/check-config/invalid-config--no-option/snapshot.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[1] .redocly.yaml:6:3 at #/rules/context
32

43
Property `context` is not expected here.
@@ -12,5 +11,6 @@ Property `context` is not expected here.
1211
Error was generated by the configuration spec rule.
1312

1413

14+
1515
❌ Your config has 1 error.
1616

__tests__/check-config/wrong-config-type-extensions-in-assertions/snapshot.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
Deprecated plugin format detected: type-extension
31
[1] redocly.yaml:10:13 at #/rules/rule~1metadata-lifecycle/subject/type
42

53
`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", "Outputs", "CriterionObject", "XPathCriterion", "JSONPathCriterion", "SuccessActionObject", "OnSuccessActionList", "FailureActionObject", "OnFailureActionList", "NamedInputs", "NamedSuccessActions", "NamedFailureActions", "Actions", "Action", "SpecExtension".
@@ -14,5 +12,7 @@ Deprecated plugin format detected: type-extension
1412
Error was generated by the configuration spec rule.
1513

1614

15+
16+
Deprecated plugin format detected: type-extension
1717
❌ Your config has 1 error.
1818

__tests__/lint-config/config-structure/snapshot.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[1] .redocly.yaml:1:13 at #/licenseKey
32

43
Expected type `string` but got `integer`.
@@ -629,5 +628,6 @@ referenced from .redocly.yaml:142:5 at #/env/referenced-env
629628
Error was generated by the configuration spec rule.
630629

631630

631+
632632
❌ Your config has 44 errors.
633633

__tests__/lint-config/config-with-refs-extended/snapshot.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
[1] .redocly.yaml:1:1 at #/unexpected-property
32

43
Property `unexpected-property` is not expected here.
@@ -78,5 +77,6 @@ Expected type `string` but got `integer`.
7877
Error was generated by the configuration spec rule.
7978

8079

80+
8181
❌ Your config has 6 errors.
8282

0 commit comments

Comments
 (0)