Skip to content

Commit ba3930c

Browse files
authored
Fix minor documentation issues and deprecate GitHub pages (#264)
* Status code 415 is not documented (#203) Adds documention of HTTP status code 415. * Status code 415 added to table of codes * Available status codes fixed in swagger * Status code 415 is not documented (#203) Adds documention of HTTP status code 415. * Status code 415 added to table of codes * Available status codes fixed in swagger * Available status codes fixed in swagger * Available status codes fixed in swagger * Available status codes fixed in swagger * Available status codes fixed in swagger CHANGELOG.md modified to reflect version number. * Documentation cleanup and reformatting
1 parent 7eec949 commit ba3930c

File tree

2 files changed

+81
-17
lines changed

2 files changed

+81
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
[![Coverage Status](https://coveralls.io/repos/github/eiffel-community/eiffel-remrem-publish/badge.svg?branch=master)](https://coveralls.io/github/eiffel-community/eiffel-remrem-publish?branch=master)
2525
[![](https://jitpack.io/v/eiffel-community/eiffel-remrem-publish.svg)](https://jitpack.io/#eiffel-community/eiffel-remrem-publish)
2626

27-
REMReM Publish is a microservice allowing sending of messages to a topic based exchange on a RabbitMQ Server. It has endpoints that must be called as a relative links. Further documentation is provided at the following link: [https://eiffel-community.github.io/eiffel-remrem-publish](https://eiffel-community.github.io/eiffel-remrem-publish)
27+
REMReM Publish is a microservice allowing sending of messages to a topic based exchange on a RabbitMQ Server. It has endpoints that must be called as a relative links.
2828

2929
# About this repository
3030
The contents of this repository are licensed under the [Apache License 2.0](./LICENSE).

wiki/markdown/usage/service.md

Lines changed: 80 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -205,20 +205,84 @@ generate.server.appName: <application name of generate service, eg: generate>
205205

206206
Available REST resources for REMReM Publish Service are described below.
207207

208-
| Resource | Method | Parameters | Request body | Description |
209-
|---------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
210-
| /producer/msg | POST | mp - message protocol, required msgType - message type, required ud - user domain, not required tag - not required rk - routing key, not required | { "meta": { # Matches the meta object }, "data": { # Matches the data object }, "links": { # Matches the links object } } | This endpoint is used to publish already generated Eiffel event to message bus. **Note:** This endpoint will not validate the message. It will check only if the message contains eventId and eventType. |
211-
| /generateAndPublish | POST | mp - message protocol, required ud - user domain, not required tag - not required rk - routing key, not required failIfMultipleFound - default: false, failIfNoneFound - default: false, lookupInExternalERs - default: false, lookupLimit - default: 1| { "msgParams": { "meta": { # Matches the meta object } }, "eventParams": { "data": { # Matches the data object }, "links": { # Matches the links object } } } | This endpoint is used to generate and publish Eiffel events to message bus. It provides single endpoint for both REMReM Generate and REMReM Publish. The service works on the relative link /generateAndPublish if run as standalone application or /publish/generateAndPublish if run as tomcat app. |
212-
| /versions | GET | | | This endpoint is used to get versions of publish service and all loaded protocols. |
213-
214-
**generateAndPublish endpoint is provided with four options for Lookups:**
215-
216-
| Options | Default Value | Description |
217-
|----------------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
218-
| failIfMultipleFound: | False | If value is set to True and multiple event ids are found through any of the provided lookup definitions, then no event will be generated. |
219-
| failIfNoneFound: | False | If value is set to True and no event id is found through (at least one of) the provided lookup definitions, then no event will be generated. |
220-
| lookupInExternalERs: | False | If value is set to True then REMReM will query external ERs and not just the locally used ER. The reason for the default value to be False is to decrease the load on external ERs. Here local ER means Single ER which is using REMReM generate. External ER means multiple ER's which are configured in Local ER.|
221-
| lookupLimit: | 1 | The number of events returned, through any lookup definition given, is limited to this number. |
208+
### `/versions`
209+
This endpoint is used to get versions of publish service and all loaded protocols.
210+
211+
##### HTTP Method
212+
GET
213+
214+
### `/producer/msg`
215+
This endpoint is used to publish already generated Eiffel event to message bus.
216+
217+
Note: This endpoint will not validate the message. It will check only if the message contains eventId and eventType.
218+
219+
##### HTTP Method
220+
POST
221+
222+
##### Parameters
223+
224+
| Name | Description | Required |
225+
|------|-------------|----------|
226+
| `mp` | message protocol | yes |
227+
| `msgType` | message type | yes |
228+
| `ud` | user domain | no |
229+
| `tag` | | no |
230+
| `rk` | routing key | no|
231+
232+
##### Request
233+
```
234+
{
235+
"meta": {
236+
# Matches the meta object
237+
},
238+
"data": {
239+
# Matches the data object
240+
},
241+
"links": {
242+
# Matches the links object
243+
}
244+
}
245+
```
246+
247+
### `/generateAndPublish`
248+
This endpoint is used to generate and publish Eiffel events to message bus.
249+
It provides single endpoint for both REMReM Generate and REMReM Publish.
250+
The service works on the relative link `/generateAndPublish` if run as standalone
251+
application or `/publish/generateAndPublish` if run as Tomcat app.
252+
253+
##### HTTP Method
254+
POST
255+
256+
##### Parameters
257+
| Name | Description | Required | Default value |
258+
|------|------------------------------------------|----------|---------------|
259+
| `mp` | Message protocol. | yes |
260+
| `ud` | User domain .| no |
261+
| `tag` | | no |
262+
| `rk` | Routing key .| no |
263+
| `failIfMultipleFound` | If value is set to `truea and multiple event ids are found through any of the provided lookup definitions, then no event will be generated .| no | `false` |
264+
| `failIfNoneFound` | If value is set to `true` and no event id is found through (at least one of) the provided lookup definitions, then no event will be generated .| no | `false` |
265+
| `lookupInExternalERs` | If value is set to True then REMReM will query external ERs and not just the locally used ER. The reason for the default value to be `false` is to decrease the load on external ERs. Here local ER means single ER which is using REMReM generate. External ER means multiple ER's which are configured in local ER. | no | `false` |
266+
| `lookupLimit` | The number of events returned, through any lookup definition given, is limited to this number. | no |`1` |
267+
268+
##### Request
269+
```
270+
{
271+
"msgParams": {
272+
"meta": {
273+
# Matches the meta object
274+
}
275+
},
276+
"eventParams": {
277+
"data": {
278+
# Matches the data object
279+
},
280+
"links": {
281+
# Matches the links object
282+
}
283+
}
284+
}
285+
```
222286

223287
## Examples
224288

@@ -311,7 +375,7 @@ Result:
311375
{"timestamp":"Dec 2, 2021 7:44:31 PM","status":400,"error":"Bad Request","message":"Could not read JSON: ..."}
312376
```
313377

314-
### Examples for /generateAndPublish endpoint
378+
### Examples for ``/generateAndPublish`` endpoint
315379

316380
**Correct message:**
317381

@@ -349,7 +413,7 @@ Result:
349413
{"result":"error","message":"Unknown event type requested..."}
350414
```
351415

352-
### Examples for `/versions` endpoint
416+
### Examples for ``/versions`` endpoint
353417

354418
```
355419
curl -H "Content-Type: application/json" -X GET http://localhost:8080/generate/versions

0 commit comments

Comments
 (0)