Redocly / redocly-cli

⚒️ Redocly CLI makes OpenAPI easy. Lint/validate to any standard, generate beautiful docs, and more.
https://redocly.com/docs/cli/
MIT License
905 stars 137 forks source link

Error linting official Arazzo examples #1682

Closed javaguruen closed 2 weeks ago

javaguruen commented 2 weeks ago

From version 1.20.0 the linter reports errors when linting the official Arazzo specification examples from their github

Either the examples are wrong according to the specification or the linter is wrong, but I cannot determine which.

To Reproduce Steps to reproduce the behavior:

  1. redocly lint https://raw.githubusercontent.com/OAI/Arazzo-Specification/main/examples/1.0.0/bnpl-arazzo.yaml
  2. redocly lint https://raw.githubusercontent.com/OAI/Arazzo-Specification/main/examples/1.0.0/LoginAndRetrievePets.arazzo.yaml

Gives 13 errors of the type

validating https://raw.githubusercontent.com/OAI/Arazzo-Specification/main/examples/1.0.0/bnpl-arazzo.yaml...
[1] https://raw.githubusercontent.com/OAI/Arazzo-Specification/main/examples/1.0.0/bnpl-arazzo.yaml:14:13 at #/workflows/0/inputs/type

Expected type `Schema` (object) but got `string`

12 | description: Describes the steps to secure a loan at checkout from a BNPL platform. It is a multistep process that require...<61 chars>
13 | inputs:
14 |     type: object
15 |     required:
16 |     - customer

Error was generated by the spec rule.

Expected behavior

If the official Arazzo examples are correct I would expect no errors.

Logs

OpenAPI description

The examples are Arazzo 1.0.0

Redocly Version(s)

1.21.0

Node.js Version(s)

v18.17.1

tatomyr commented 2 weeks ago

Thanks for letting us know @javaguruen! The fix is already in review and should be available in the next version (I anticipate it the next week).

FIY @DmitryAnansky

tatomyr commented 2 weeks ago

Released in v1.22.0. @javaguruen FYI