-
Notifications
You must be signed in to change notification settings - Fork 8
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
Lifecycle rules #112
Lifecycle rules #112
Conversation
it("fails when the schedule isn't met", async () => { | ||
const result = await compare(baseOpenAPI) | ||
.to((spec) => { | ||
spec.info.title = "Empty"; |
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.
What if I compare a non-empty OpenAPI spec that happens to have the info.title "Empty"? Is there a more robust way to express this?
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.
Per side-channel discussion, a special-use extension would be best here, to make a precise distinction between content and processing metadata. So maybe spec.extensions['x-optic-ci-empty-spec'] = true
or something to that effect? We can then lay claim to all extensions x-optic-ci-*
.
While I'll admit an API called "Empty" is really unlikely (or is it... maybe it's a placeholder name used for a generated template OpenAPI, a mock, or "empty.io", the service that stares back when you stare into the void for too long!), for me it's more about providing a precise contract & behavior.
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 all for it, @smizell gave me write permissions on this PR, I'll make the change today
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.
waiting on a library release to get this out. We're also bundling some performance fixes for bulk-mode and compare.
Resolved conflicts (sorry hadn't seen that pop up). We're going to fix the |
This adds a rule for ensuring the sunset rules are followed.
deprecatedBy
, then it fails saying it should be deprecated firstdeprecatedBy
, it will check the dates to make sure it's been long enough