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

Documenting the Service Schema for Generic #218

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fanuch
Copy link

@fanuch fanuch commented Dec 17, 2021

PR for documenting explicitly the service schema for Generic

Took me about an hour to work out how to use ./shoutrrr send for a generic request till I read through the PR for generic.
Hope this small change can help others.

I wanted to make changes the generic service document but I am not sure of what voodoo is going on as the linked file and directory at docs/services/generic/config.md does not exist in the repo!

@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

Merging #218 (6b5cf7d) into main (e46ecc1) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage   76.95%   76.95%           
=======================================
  Files          85       85           
  Lines        2703     2703           
=======================================
  Hits         2080     2080           
  Misses        441      441           
  Partials      182      182           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e46ecc1...6b5cf7d. Read the comment docs.

@piksel
Copy link
Member

piksel commented Dec 17, 2021

Hello! The documentation is located in https://github.com/containrrr/shoutrrr/blob/main/docs/services/generic.md. Just put any additional content below the include line. The config.md file is generated from the actual config parser when building the docs (through generate-service-config-docs.sh).

@fanuch
Copy link
Author

fanuch commented Dec 18, 2021

The config.md file is generated from the actual config parser when building the docs

Ah that's brilliant.
I'll add more commits to help the generic schema docs page looks closer to the other pages - may as well if I am adding this change in

@jbishop129
Copy link

jbishop129 commented Feb 25, 2022

Hello, I'm wondering if the generic service was documented at some point? it's pretty sparse on the docs section of the website, and nothing of interest in the generic.md. I'm asking because I'm struggling to figure out how to get a generic webhook to use http instead of always defaulting to https. Anyway, link to the above documentation file is just showing this:
image

@muellermartin
Copy link

@jbishop129 I had the exact same issue with http instead of https URLs causing the error http: server gave HTTP response to HTTPS client and via this comment in #208 I could correctly guess that the URL must start with generic+http:// for an HTTP URL.

@piksel
Copy link
Member

piksel commented May 16, 2022

@jbishop129 I had the exact same issue with http instead of https URLs causing the error http: server gave HTTP response to HTTPS client and via this comment in #208 I could correctly guess that the URL must start with generic+http:// for an HTTP URL.

Yeah, sorry about that. It's generic+<URL> where <URL> can be either a http:// or https:// URL. All query params will be forwarded, except for the ones listed in the (very limited) docs.

If you need to add one of the reserved query params, you can escape it by prefixing it with __:

generic+https://server/path?__contentType=text/plain

That would cause the service to do a POST request, with the ContentType header set to application/json, to:

https://server/path?contentType=text/plain

but unescaped

generic+https://server/path?contentType=text/plain

it would instead send it with the ContentType header set to text/plain, to:

https://server/path

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.

None yet

4 participants