Skip to content

Conversation

@mdaloia
Copy link
Contributor

@mdaloia mdaloia commented Jan 25, 2019

Since version 0.9.0 the openapi-tags-alphabetical rule is not working due to a invalid type of its properties attribute (Reference). It must be an array of strings instead of a string. Like this:

- name: openapi-tags-alphabetical
  object: openapi
  description: openapi object should have alphabetical tags
  alphabetical:
    properties:
      - tags
    keyedBy: name

The reason that it stopped working is that in the 0.8.x version from the speecy side there was an adaptation done while the rule was being created.
As on version 0.9.x it relies on oas-linter this code was removed and delegates it to that module, but this adaptation is not present here.

Maybe it is better to add the adaptation and/or a data type validation in oas-linter rules to avoid silent fails (The rule result was always ok because it tried to find in the openapi spec a property whose name was the first letter of the configured property in the rule due to this for).
Let me know if you agree on adding the adaptation in oas-linter, I could open a PR in that case.

The 'properties' key of the 'alphabetical' rule must be an array of
strings instead of a string.
@pderaaij
Copy link
Contributor

Looks good to me! Thanks for your contribution!

@pderaaij
Copy link
Contributor

@djtarazona This one can be tagged along as well.

@djtarazona djtarazona merged commit 03a061f into wework:master May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants