[RFC] Teach overrides to honor JSON Pointers
See original GitHub issuePotential laxer locations syntaxes have been evoked in #939 and eventually dropped out to keep the PR on scope.
This issue is a placeholder to gather feedback, use cases and try and measure how important allowing less strict locations would be.
From https://github.com/stoplightio/spectral/pull/939#discussion_r387493237
Current location syntax is: <source>#<pointer>
where
source
can be expressed as- an absolute uri (file or http based)
- relatively to the to the rulesepath uri
pointer
is a Json pointer (cf. https://tools.ietf.org/html/rfc6901) describing the precise document path that should be ignored
Latest update to the proposal was to allow a more open location syntax where
-
<source>
could be optional #1423 -
#<pointer>
could be optional #1405 - at least one of them should be described #1423
-
<pointer>
meaning would change
Samples:
models/awful.json: [ rule1, rule2]
: Would ignore rule1 and rule2 results wheverever in the file#/info": [rule1, rule2]
: Would ignore rule1 and rule2 results in any processed document provided they originate from a path that’s#/info
or below (eg.#/info/sub/path/1
). This would be in line with @P0lip’s comment
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
JavaScript Object Notation (JSON) Pointer RFC 6901
JavaScript Object Notation (JSON) Pointer
Read more >JSON Pointers
RFC6901 JSON Pointers and RFC Draft Relative JSON Pointers are the basis for BIG-IP Declarative Onboarding pointers, but support special relative references ...
Read more >encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159. The mapping between JSON and Go values is described in...
Read more >MessagePack: It's like JSON. but fast and small.
MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. Small ......
Read more >Go
4 5 // Package json implements encoding and decoding of JSON as defined in 6 // RFC 7159. The mapping between JSON and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ariatron This has been added to the scope for v6! 🙏
🎉 This issue has been resolved in version @stoplight/spectral-core-v1.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀