-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): support multiple JSONPath expressions for aliases #2016
Conversation
@@ -322,13 +324,69 @@ For now the JSON, YAML, and JS, are all being maintained, and there are no curre | |||
|
|||
## Aliases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mnaumanali94 what do you think?
bf3ae2b
to
b397d16
Compare
docs/guides/4-custom-rulesets.md
Outdated
This is the JSON Schema definition describing aliases. | ||
It's a superset of `given`, with the notable difference being the possibility to distinguish between different formats. | ||
|
||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this will really be all that helpful for folks reading the docs, and might just be confusing? I'm pretty well versed with json schema, and even so it's not easy to imagine what this schema is trying to describe. The examples are much more helpful 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I might just delete it.
Do you think the examples here are sufficient or should I add a few additional ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think delete and good for now
d00b0b0
to
f473884
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good - however as discussed, definitely think that we should not expose/advertise the baked in aliases until we have time to really think them through.
# [@stoplight/spectral-core-v1.9.0](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-core-v1.8.1...@stoplight/spectral-core-v1.9.0) (2022-01-19) ### Features * **core:** support multiple JSONPath expressions for aliases ([#2016](#2016)) ([f1b2c2c](f1b2c2c))
🎉 This PR is included in version @stoplight/spectral-core-v1.9.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
This PR introduced a breaking change to the
I'll update my code accordingly, but I'm adding this comment here to help anyone searching for this error in the future. |
@DiogoDoreto true. I felt a bit uncomfortable releasing this change as non-breaking, as I knew this could affect a few users using it. In fact, the initial iteration of this PR was backward compatible, but having a few internal conversations we decided to make that soft breaking change. |
Related to https://github.com/stoplightio/platform-internal/issues/8141
Needed by #2018
Example usage
spectral/packages/rulesets/src/oas/index.ts
Line 38 in a2019f1
I believe that once this one is in, we can consider the aliases frozen and won't need to make any further changes.
Checklist
Does this PR introduce a breaking change?