-
Notifications
You must be signed in to change notification settings - Fork 97
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: [GROOT-1550] introduce proposal for fixing update behavior in taxonomy #2469
Conversation
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.
Nice one Liam, this makes sense to me: but would love Tundra's eyes on it too.
They seem to agree with the general idea - I would recommend we approve this and merge it into my other PR, and they can then review that all together 👍 |
data, | ||
{ | ||
headers: { | ||
'X-Contentful-Version': params.version ?? 0, |
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.
why do we want to provide a default version? i think the error will be confusing in case it doesn't match
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.
Fair point, can remove
@@ -51,10 +51,13 @@ export type ConceptSchemePlainClientAPI = { | |||
* @returns the updated Concept Scheme | |||
* @throws if the request fails | |||
* @see {@link https://www.contentful.com/developers/docs/references/content-management-api/#/reference/taxonomy/concept-scheme} | |||
* @deprecated The behavior of this method as a PATCH is being deprecated, and will be replaced with a PUT in the next major version. Use the `patch` method instead. |
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.
in the next major version
how can we make sure we don't forget to update it?
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.
btw the last time we updated the major version was more than a year ago. long process
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.
Fair point, but the impression I get from Tundra from our slack thread is that they'll work with us on this as planning for the next version.
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 just if...
import * as package from 'package.json'
it('should not pass if major version is updated', () => {
if (package.version.split('.')[0] === 12) {
expect('updatePut' in sdk).to.be(false)
}
})
…axonomy (#2469) * feat: [GROOT-1550] introduce proposal for fixing update behavior in taxonomy * chore: [GROOT-1550] remove default version for taxonomy updates
* feat: [GROOT-1550] add support for taxonomy PUT methods * feat: [GROOT-1550] introduce proposal for fixing update behavior in taxonomy (#2469) * feat: [GROOT-1550] introduce proposal for fixing update behavior in taxonomy * chore: [GROOT-1550] remove default version for taxonomy updates * fix: [GROOT-1550] remove patch header from taxonomy put method
Summary
This proposal looks to handle a mismatch in how taxonomy update methods are used when compared to other entities.
Long term plan in next major version is to:
patch
methodupdate
method to usePUT
Short term plan is to:
patch
methodupdate
as deprecated, and explain change toPUT
updatePut
method and mark as deprecated, so that we can usePUT
requests for the time beingDescription
Motivation and Context
Checklist (check all before merging)
When adding a new method:
./lib/export-types.ts