This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Izakey/develop
Document the Office API
- Loading branch information
Showing
67 changed files
with
2,744 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,201 @@ | ||
== Apache Fineract CN Office Management API Documentation == | ||
|
||
== Offices == | ||
|
||
==== Create An Office ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-office/should-create-office/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-office/should-create-office/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-office/should-create-office/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-office/should-create-office/httpie-request.adoc[] | ||
|
||
==== Get An Office ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-office/should-indicate-office-has-external-references/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-office/should-indicate-office-has-external-references/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-office/should-indicate-office-has-external-references/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-office/should-indicate-office-has-external-references/httpie-request.adoc[] | ||
|
||
==== Get An Office's Address ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-office/should-get-address-of-office/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-office/should-get-address-of-office/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-office/should-get-address-of-office/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-office/should-get-address-of-office/httpie-request.adoc[] | ||
|
||
==== Update An Office's Address ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-office/should-set-address-of-office/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-office/should-set-address-of-office/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-office/should-set-address-of-office/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-office/should-set-address-of-office/httpie-request.adoc[] | ||
|
||
==== Update An Office ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-office/should-update-office/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-office/should-update-office/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-office/should-update-office/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-office/should-update-office/httpie-request.adoc[] | ||
|
||
==== Delete An Office's Address ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-office/should-delete-address-of-office/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-office/should-delete-address-of-office/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-office/should-delete-address-of-office/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-office/should-delete-address-of-office/httpie-request.adoc[] | ||
|
||
==== Add A Branch To An Office ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-office/should-add-branch/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-office/should-add-branch/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-office/should-add-branch/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-office/should-add-branch/httpie-request.adoc[] | ||
|
||
== Employees == | ||
|
||
==== Create An Employee ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-employee/should-create-employee/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-employee/should-create-employee/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-employee/should-create-employee/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-employee/should-create-employee/httpie-request.adoc[] | ||
|
||
==== Update An Employee ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-employee/should-update-employee/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-employee/should-update-employee/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-employee/should-update-employee/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-employee/should-update-employee/httpie-request.adoc[] | ||
|
||
==== Get Employees ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-employee/should-find-all-employees/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-employee/should-find-all-employees/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-employee/should-find-all-employees/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-employee/should-find-all-employees/httpie-request.adoc[] | ||
|
||
==== Get An Office's Employees ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-employee/should-find-employees-by-office/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-employee/should-find-employees-by-office/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-employee/should-find-employees-by-office/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-employee/should-find-employees-by-office/httpie-request.adoc[] | ||
|
||
==== Update Employee's Contact Details ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-employee/should-set-contact-detail-of-employee/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-employee/should-set-contact-detail-of-employee/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-employee/should-set-contact-detail-of-employee/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-employee/should-set-contact-detail-of-employee/httpie-request.adoc[] | ||
|
||
==== Delete Employee's Contact Details ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-employee/should-delete-contact-detail-of-employee/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-employee/should-delete-contact-detail-of-employee/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-employee/should-delete-contact-detail-of-employee/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-employee/should-delete-contact-detail-of-employee/httpie-request.adoc[] | ||
|
||
==== Delete An Employee ==== | ||
|
||
.curl-request | ||
include::{snippets}/test-employee/should-delete-employee/curl-request.adoc[] | ||
|
||
.http-request | ||
include::{snippets}/test-employee/should-delete-employee/http-request.adoc[] | ||
|
||
.http-response | ||
include::{snippets}/test-employee/should-delete-employee/http-response.adoc[] | ||
|
||
.httpie-request | ||
include::{snippets}/test-employee/should-delete-employee/httpie-request.adoc[] |
4 changes: 4 additions & 0 deletions
4
...c/doc/generated-snippets/test-employee/should-create-employee/curl-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ curl 'http://localhost:8080/office/v1/employees' -i -X POST -H 'Content-Type: application/json' -d 'pmOnIEX1BHG2Zj3CI45It135RjS30UMZ' | ||
---- |
9 changes: 9 additions & 0 deletions
9
...c/doc/generated-snippets/test-employee/should-create-employee/http-request.adoc
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
POST /office/v1/employees HTTP/1.1 | ||
Content-Type: application/json | ||
Host: localhost:8080 | ||
Content-Length: 32 | ||
pmOnIEX1BHG2Zj3CI45It135RjS30UMZ | ||
---- |
5 changes: 5 additions & 0 deletions
5
.../doc/generated-snippets/test-employee/should-create-employee/http-response.adoc
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
HTTP/1.1 404 Not Found | ||
---- |
4 changes: 4 additions & 0 deletions
4
...doc/generated-snippets/test-employee/should-create-employee/httpie-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ echo 'pmOnIEX1BHG2Zj3CI45It135RjS30UMZ' | http POST 'http://localhost:8080/office/v1/employees' 'Content-Type:application/json' | ||
---- |
4 changes: 4 additions & 0 deletions
4
...ippets/test-employee/should-delete-contact-detail-of-employee/curl-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ curl 'http://localhost:8080/office/v1/employees/GNhkajYzqKNwN4QCRkuPbCl5ZhME0LfO/contacts' -i -X DELETE -H 'Content-Type: image/png' | ||
---- |
7 changes: 7 additions & 0 deletions
7
...ippets/test-employee/should-delete-contact-detail-of-employee/http-request.adoc
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
DELETE /office/v1/employees/GNhkajYzqKNwN4QCRkuPbCl5ZhME0LfO/contacts HTTP/1.1 | ||
Content-Type: image/png | ||
Host: localhost:8080 | ||
---- |
5 changes: 5 additions & 0 deletions
5
...ppets/test-employee/should-delete-contact-detail-of-employee/http-response.adoc
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
HTTP/1.1 404 Not Found | ||
---- |
4 changes: 4 additions & 0 deletions
4
...pets/test-employee/should-delete-contact-detail-of-employee/httpie-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ http DELETE 'http://localhost:8080/office/v1/employees/GNhkajYzqKNwN4QCRkuPbCl5ZhME0LfO/contacts' 'Content-Type:image/png' | ||
---- |
4 changes: 4 additions & 0 deletions
4
...c/doc/generated-snippets/test-employee/should-delete-employee/curl-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ curl 'http://localhost:8080/office/v1/employees/FBea9IQEOII3aaR7xv7jBQCN6dEFrqqY' -i -X DELETE -H 'Accept: */*' -H 'Content-Type: application/json' | ||
---- |
8 changes: 8 additions & 0 deletions
8
...c/doc/generated-snippets/test-employee/should-delete-employee/http-request.adoc
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
DELETE /office/v1/employees/FBea9IQEOII3aaR7xv7jBQCN6dEFrqqY HTTP/1.1 | ||
Accept: */* | ||
Content-Type: application/json | ||
Host: localhost:8080 | ||
---- |
5 changes: 5 additions & 0 deletions
5
.../doc/generated-snippets/test-employee/should-delete-employee/http-response.adoc
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
HTTP/1.1 404 Not Found | ||
---- |
4 changes: 4 additions & 0 deletions
4
...doc/generated-snippets/test-employee/should-delete-employee/httpie-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ http DELETE 'http://localhost:8080/office/v1/employees/FBea9IQEOII3aaR7xv7jBQCN6dEFrqqY' 'Accept:*/*' 'Content-Type:application/json' | ||
---- |
4 changes: 4 additions & 0 deletions
4
...oc/generated-snippets/test-employee/should-find-all-employees/curl-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ curl 'http://localhost:8080/office/v1/employees' -i -H 'Accept: */*' | ||
---- |
7 changes: 7 additions & 0 deletions
7
...oc/generated-snippets/test-employee/should-find-all-employees/http-request.adoc
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
GET /office/v1/employees HTTP/1.1 | ||
Accept: */* | ||
Host: localhost:8080 | ||
---- |
5 changes: 5 additions & 0 deletions
5
...c/generated-snippets/test-employee/should-find-all-employees/http-response.adoc
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
HTTP/1.1 404 Not Found | ||
---- |
4 changes: 4 additions & 0 deletions
4
.../generated-snippets/test-employee/should-find-all-employees/httpie-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ http GET 'http://localhost:8080/office/v1/employees' 'Accept:*/*' | ||
---- |
4 changes: 4 additions & 0 deletions
4
...erated-snippets/test-employee/should-find-employees-by-office/curl-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ curl 'http://localhost:8080/office/v1/employees' -i -H 'Accept: */*' | ||
---- |
7 changes: 7 additions & 0 deletions
7
...erated-snippets/test-employee/should-find-employees-by-office/http-request.adoc
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
GET /office/v1/employees HTTP/1.1 | ||
Accept: */* | ||
Host: localhost:8080 | ||
---- |
5 changes: 5 additions & 0 deletions
5
...rated-snippets/test-employee/should-find-employees-by-office/http-response.adoc
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[source,http,options="nowrap"] | ||
---- | ||
HTTP/1.1 404 Not Found | ||
---- |
4 changes: 4 additions & 0 deletions
4
...ated-snippets/test-employee/should-find-employees-by-office/httpie-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ http GET 'http://localhost:8080/office/v1/employees' 'Accept:*/*' | ||
---- |
4 changes: 4 additions & 0 deletions
4
...-snippets/test-employee/should-set-contact-detail-of-employee/curl-request.adoc
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[source,bash] | ||
---- | ||
$ curl 'http://localhost:8080/office/v1/employees/nqnRpYG4QlyLKtPVrJQDz2mEak2cncBL/contacts' -i -X PUT -H 'Accept: */*' -H 'Content-Type: application/json' -d 'nqnRpYG4QlyLKtPVrJQDz2mEak2cncBL' | ||
---- |
Oops, something went wrong.