Skip to content
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

Added support of PATCH method #472

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Added support of PATCH method #472

wants to merge 2 commits into from

Conversation

ziflex
Copy link

@ziflex ziflex commented Nov 11, 2024

This pull request includes changes to add support for the PATCH HTTP method in the HTTP data source. The most important changes include updating the documentation, modifying the schema to include the PATCH method, and adding a test for the new method.

Documentation Updates:

  • Updated the HTTP method list in the documentation to include PATCH.

Code Updates:

  • Modified the schema definition to support the PATCH method in the HTTP data source.

Testing:

  • Added a new test case to verify the functionality of the PATCH method in the HTTP data source.

@ziflex ziflex requested a review from a team as a code owner November 11, 2024 19:46
Copy link

hashicorp-cla-app bot commented Nov 11, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@ziflex
Copy link
Author

ziflex commented Nov 11, 2024

I know it's not part of the RFC7231 but it's really needed. (Also, I think PUT needs to be added later on too).

@bbasata
Copy link

bbasata commented Dec 2, 2024

Hi @ziflex. I'm cautious about expanding the "read-only POST" exception any further. When I hear POST / PATCH / PUT, I think "side effects."

So the constraint exists to make it easy for practitioners to do the right thing.

@ziflex
Copy link
Author

ziflex commented Dec 2, 2024

@bbasata While I respect your intentions to encourage people to do the right thing, the reality is far from being a perfect place. In my particular case, the API I need to use this module for is a 3rd party service I do not have access to and, alas, they use the PATCH method for certain operations.

Also, this is an utility module, and adding such restrictions seems counterproductive to me.

Why not to keep it simple and let people do their thing?

@bbasata
Copy link

bbasata commented Dec 4, 2024

In my particular case, the API I need to use this module for is a 3rd party service I do not have access to and, alas, they use the PATCH method for certain operations.

Got it. I'm certainly curious -- would you tell me more about the problem you're solving? What's the purpose of the PATCH operation?

@ziflex
Copy link
Author

ziflex commented Dec 4, 2024

In my particular case, the API I need to use this module for is a 3rd party service I do not have access to and, alas, they use the PATCH method for certain operations.

Got it. I'm certainly curious -- would you tell me more about the problem you're solving? What's the purpose of the PATCH operation?

Sure. The 3rd party service is Auth0.
In one of the main modules, we needed to update our tenant settings. Auth0's API has a dedicated endpoint, but for updates it supports PATCH method only.
I ended up using null_resource which is less desirable than http resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants