Skip to content

watermarkImage must be in lowerCamelCase - #255

Merged
h2non merged 1 commit into
h2non:masterfrom
bscheshirwork:watermark-image-in-camel-case
Jun 6, 2020
Merged

h2non merged 1 commit into
h2non:masterfrom
bscheshirwork:watermark-image-in-camel-case

Conversation

@bscheshirwork

Copy link
Copy Markdown
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

Dynom commented Apr 1, 2019

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor Author

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

@Dynom

Dynom commented Apr 2, 2019

Copy link
Copy Markdown
Collaborator

@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

bscheshirwork commented Apr 2, 2019 •

Copy link
Copy Markdown
Contributor Author

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

⌂ 换网址