-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wire up event documentation generation
- Loading branch information
Oli Dagenais
committed
Jul 27, 2016
1 parent
22936a5
commit 69956d8
Showing
2 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
<html> | ||
<body> | ||
<h1>The <code>%1$s</code> endpoint</h1> | ||
<h1>The <code>/%1$s/</code> endpoint</h1> | ||
<h2>Events</h2> | ||
The following events are available to POST to: | ||
<table border="1"> | ||
<tr> | ||
<th>Name</th> | ||
<th>Path</th> | ||
<th>Sample payload</th> | ||
</tr> | ||
%2$s | ||
</table> | ||
<h2>Example</h2> | ||
Suppose we have a Jenkins server at <code>%3$s</code> and the following <code>payload.json</code> file: | ||
<pre> | ||
{ | ||
"message": "Hello, world!" | ||
} | ||
</pre> | ||
The following example demonstrates a POST to the <code>ping</code> event using the <a href="https://curl.haxx.se/">curl</a> tool: | ||
<pre> | ||
curl --request POST %3$s%1$s/ping --header 'Content-Type: application/json' --data-binary @payload.json | ||
</pre> | ||
The console output should look like the following when the <code>ping</code> event from the <code>%1$s</code> endpoint returns the provided payload, formatted for compactness: | ||
<pre> | ||
{"message":"Hello, world!"} | ||
</pre> | ||
</body> | ||
The following events are available: | ||
%2$s | ||
</html> |