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

watermarkImage must be in lowerCamelCase #255

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

bscheshirwork
Copy link
Contributor

watermarkImage instead watermarkimage

{"message":"Error while processing the image: Unsupported operation name: watermarkimage","code":1}

"watermarkImage": WatermarkImage,

watermarkImage instead watermarkimage

{"message":"Error while processing the image: Unsupported operation name: watermarkimage","code":1}

https://github.com/h2non/imaginary/blob/cc53838d71e38f2d7163e8ae0280f466ce4f9998/image.go#L29
@Dynom
Copy link
Collaborator

Dynom commented Apr 1, 2019

Thanks for your contribution!

Since all endpoints, even ones with multiple words, are in lowercase. The fix should be to change the route instead.

So if you revert your change, and instead apply this one, I can merge it in!

diff --git image.go image.go
index 736a321..345595d 100644
--- image.go
+++ image.go
@@ -26,7 +26,7 @@ var OperationsMap = map[string]Operation{
        "zoom":           Zoom,
        "convert":        Convert,
        "watermark":      Watermark,
-       "watermarkImage": WatermarkImage,
+       "watermarkimage": WatermarkImage,
        "blur":           GaussianBlur,
        "smartcrop":      SmartCrop,
        "fit":            Fit,

@Dynom Dynom self-requested a review April 1, 2019 09:59
@Dynom Dynom added the bug label Apr 1, 2019
@bscheshirwork
Copy link
Contributor Author

@Dynom
So... If this is change in route this is BC broken changes and we must publish new release for it.

@Dynom
Copy link
Collaborator

Dynom commented Apr 2, 2019

@bscheshirwork Agreed. I need to think about what the best approach is. We could introduce a temporary alias with a deprecation warning or again bump a minor version (1.2.x) or take it as is and hope it wont break for anyone.

@bscheshirwork
Copy link
Contributor Author

bscheshirwork commented Apr 2, 2019

or take it as is and hope it wont break for anyone.

😹

@h2non h2non merged commit b2a142a into h2non:master Jun 6, 2020
j-keck pushed a commit to artidis/imaginary that referenced this pull request Aug 11, 2022
watermarkImage instead watermarkimage

{"message":"Error while processing the image: Unsupported operation name: watermarkimage","code":1}

https://github.com/h2non/imaginary/blob/cc53838d71e38f2d7163e8ae0280f466ce4f9998/image.go#L29
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.

3 participants