-
Notifications
You must be signed in to change notification settings - Fork 17
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
chore(specs): add eslint rule to avoid cross-references #3413
Conversation
No code generatedIf you believe code should've been generated, please, report the issue. 📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
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.
Sooooo niceeeee gg!!
eslint/src/rules/refCommon.ts
Outdated
export const refCommon: Rule.RuleModule = { | ||
meta: { | ||
docs: { | ||
description: 'the $ref must target the current spec, or the common spec', |
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.
Maybe make it more informative? E.g. "if you intended to use a model from an other spec, move it to the common folder" or something
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.
gggggggg
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.
gggggg
🧭 What and Why
Suggested by @shortcuts, cross-reference are forbidden because they break our caching and generation strategy, we can add a custom rule to assert that.
The rule needs the list of clients because we allow everything inside each spec, just not with another spec.