Skip to content

Disabling Rules and JSON Path #1984

Answered by P0lip
yordis asked this question in Q&A
Dec 2, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey!
First of all, exceptions were superseded by a more powerful feature called overrides. You can find some documentation on them here https://github.com/stoplightio/spectral/blob/develop/docs/guides/4-custom-rulesets.md#overrides
They still work in JSON/YAML rulesets, because ruleset-migrator (the project we use to translate the rulesets into a more native format Spectral can operate on) transforms exceptions intooverrides.
Answering your initial question - I think you might need to escape things more properly.
The value after the filepath / glob, has to be a valid JSON Pointer (https://datatracker.ietf.org/doc/html/rfc6901), so I suspect the following should work fine my-file.json#/~1p…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yordis
Comment options

@yordis
Comment options

Answer selected by yordis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants