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

Allow to specify which mappings are used for which purpose in Request #58

Closed
irizzant opened this issue Sep 27, 2024 · 4 comments · Fixed by #62
Closed

Allow to specify which mappings are used for which purpose in Request #58

irizzant opened this issue Sep 27, 2024 · 4 comments · Fixed by #62
Labels
enhancement New feature or request

Comments

@irizzant
Copy link

What problem are you facing?

As far as I can understand Request works with this logic:

  • Use GET request for reconciliation to verify if the resource is created
  • If absent send a POST request
  • If changed send a PUT request

While this is an opinionated standard it would be good to allow to choose the HTTP method to use for each purpose.

E.g.
I have this API
https://api.getport.io/static/index.html#/Users

To create a User a need to send a POST to /v1/users/invite.
To update a PATCH to /v1/users/{user_email}
To get an existing User a GET to /v1/users/{user_email}

It would be great being able to map these in the mappings field.

How could Crossplane help solve your problem?

@irizzant irizzant added the enhancement New feature or request label Sep 27, 2024
@miguellobato84
Copy link

I think the mappings, instead of being HTTP verbs, should represent actions (CREATE, UPDATE, INFO, REMOVE), and the HTTP method used should be just another attribute, like the URL or the body.

This way, it would be generic enough for any API.

@arielsepton
Copy link
Member

I think this is a great idea!

I want to avoid breaking the existing API, but I’ll look into how to add this feature soon.

Thank you for the suggestion—it would definitely make managing various APIs easier!

@miguellobato84
Copy link

just saw your PR, thanks!

@irizzant
Copy link
Author

irizzant commented Oct 3, 2024

Thank you! When is the next release expected?

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

Successfully merging a pull request may close this issue.

3 participants