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

feat: implement flexible http method mapping #62

Conversation

arielsepton
Copy link
Member

PR Description: Add Support for Custom Action-based HTTP Mappings (CREATE, UPDATE, OBSERVE, REMOVE)

Summary

This PR extends the current HTTP method mappings by introducing custom actions: CREATE, UPDATE, OBSERVE, and REMOVE. These actions provide greater flexibility for managing a variety of API interactions while ensuring backward compatibility with existing HTTP methods (GET, POST, PUT, DELETE).

Changes

  • Added support for custom actions: CREATE, UPDATE, OBSERVE, and REMOVE in the mappings section.
  • These custom actions extend functionality beyond traditional HTTP methods, giving users more control over API workflows.
  • Standard HTTP methods (POST, GET, PUT, DELETE) remain fully supported without any changes, preserving compatibility.

Example Usage

Updated documentation with examples demonstrating how to use the new CREATE, UPDATE, OBSERVE, and REMOVE actions.

Motivation

These additional methods offer greater flexibility for users who require more control over complex API interactions, improving the ability to manage workflows and resource states.

Testing

  • Unit tests have been added to validate the functionality of the new actions (CREATE, UPDATE, OBSERVE, and REMOVE).
  • Integration tests confirm that the feature is backward-compatible and existing mappings remain unaffected.

Notes

This change is fully backward-compatible, ensuring that existing workflows using the traditional HTTP methods continue to function as expected.

Fixes #58

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review.

@arielsepton arielsepton merged commit 2b1f71c into crossplane-contrib:main Oct 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to specify which mappings are used for which purpose in Request
1 participant