Skip to content

lint errors by custom ruleset are reported with wrong Reference #228

@toschder

Description

@toschder

When using custom ruleset, the lint errors are always reported with wrong links to "More information":

�[31mSpecification contains lint errors: 7�[0m

�[33m#/info �[36m R: API_REPO_VERS_SEMANTIC �[37m D: MUST: Use Semantic Versioning (info.version)
�[0mMUST: Use Semantic Versioning (info.version)

More information: https://speccy.io/rules/1-rulesets#API_REPO_VERS_SEMANTIC

Detailed description

This is my rule:
{ "name": "API_REPO_VERS_SEMANTIC", "object": "info", "enabled": true, "description": "MUST: Use Semantic Versioning (info.version)", "pattern": { "property": "version", "value": "^[0-9]+[.][0-9]+([.][0-9]+)?$" } },
And it was invoked with
speccy lint /path/to/swagger2openapi.file -v --rules speccy/mycompany-rules.json

I would propose to name the ruleset like given with the --rules option. Another way could be to be able to define a URL in the custom-rules.json File(s) being given.

Context

I think everyone could benefit from that. The first thing you usually will do when hitting a validation error is to look into the rule(s) - and the available description,examples and so on.

Your environment

Ubuntu, speccy 0.8.x (latest)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions