In this modification, I created the opportunity for users to decide between using v1 api or rest api route in the SnykClient. Previously, only the get method let user to use the rest api. Patch method was created for use cases in which the verb PATCH is necessary, thing that didn't exist previously.
Technical details
added patch method in the SnykClient class.
updated old tests and added new test cases for the new modifications.
redirect delete project from v1 to rest in the client.
updated rest api version, because some endpoints were not available in the old version.
Context
These changes were made to enable users use the rest api, because v1 is approaching its end of life. It provides more flexibility to the developers who wants to interact with different instances of Snyk APIs.
How to test
This modification should not impact the existing functionality of the library. Everything should work as intended.
Description of changes
In this modification, I created the opportunity for users to decide between using v1 api or rest api route in the
SnykClient
. Previously, only the get method let user to use the rest api. Patch method was created for use cases in which the verb PATCH is necessary, thing that didn't exist previously.Technical details
SnykClient
class.Context
These changes were made to enable users use the rest api, because v1 is approaching its end of life. It provides more flexibility to the developers who wants to interact with different instances of Snyk APIs.
How to test
This modification should not impact the existing functionality of the library. Everything should work as intended.
Example Usage
Update an existing project