zally
zally copied to clipboard
Ignoring multiple rules id in zally
I am evaluating the Zally tool and was wondering if we have some sort of regex to ignore the multiple rules at once?
I know I can have the rules ids specified in the ignoreRules
attribute like below but this list will keep on increasing if I add some around 30 to 40 rules to be ignored.
# rules to be ignored system wide by default
# 115 - NoVersionInUriRule.kt
# 129 - KebabCaseInPathSegmentsRule.kt
ignoreRules: M008, M009, M010, M011, H001, H002, S005, S006, S007, 115, 129
Also as per the documentation this flag sets the ignore rule for the whole application? Is there any way through which I can give the rules-id in the client request? Maybe something from the front end which I can add? Any help would be greatly appreciated.
You can specify the ignored rules in the request body to /api-violations using the ignore_rules property
@jcolladosp thanks for your comment. can you please help me with a snippet? I would appreciate your help. somehow I have been struggling to add this property from the frontend code.
@beena-yatin-kanyal
curl -X \
POST 'http://localhost:8080/api-violations' \
--header 'Content-Type: application/json' \
--data-raw '{
"api_definition_string": "https://petstore.swagger.io/v2/swagger.json",
"ignore_rules": ["218",...]
}'
You can see the api specification here: https://github.com/zalando/zally/blob/master/server/zally-server/src/main/resources/api/zally-api.yaml
Thanks, @jcolladosp. Let me try this approach via the frontend code. Will share an update soon.
Closing it for now. Feel free to reopen if needed.