Skip to content

Commit

Permalink
added rest api link to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamhead committed May 21, 2016
1 parent dc56a23 commit 8560c3e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -47,6 +47,7 @@ java -jar moco-runner-<version>-standalone.jar http -p 12306 -c foo.json
## Documents
* More [Usages](moco-doc/usage.md)
* Detailed [HTTP APIs](moco-doc/apis.md) or [Socket APIs](moco-doc/socket-apis.md)
* Detailed [REST API](moco-doc/rest-apis.md)
* [Global Settings](moco-doc/global-settings.md) for multiple configuration files.
* [Command Line Usages](moco-doc/cmd.md)

Expand Down
8 changes: 8 additions & 0 deletions moco-doc/junit.md
Expand Up @@ -15,6 +15,8 @@ Moco make use of Test Rule in JUnit to simplify JUnit integration. **MocoJunitRu

### POJO HTTP Server

**@Since 0.11.0**

**httpRunner** can reference a HttpServer object.

```java
Expand All @@ -35,6 +37,8 @@ public class MocoJunitPojoHttpRunnerTest {

### JSON HTTP Server

**@Since 0.11.0**

**jsonHttpRunner** can reference a JSON file as a HTTP server.

```java
Expand All @@ -50,6 +54,8 @@ public class MocoJunitJsonHttpRunnerTest extends AbstractMocoStandaloneTest {

### POJO Socket Server

**@Since 0.11.0**

**socketRunner** can reference a SocketServer object.

```java
Expand All @@ -70,6 +76,8 @@ public class MocoJunitPojoSocketRunnerTest {

### JSON Socket Server

**@Since 0.11.0**

**jsonHttpRunner** can reference a JSON file as a Socket server.

```java
Expand Down
18 changes: 18 additions & 0 deletions moco-doc/rest-apis.md
Expand Up @@ -129,6 +129,8 @@ server.resource("targets",

#### Get with ID

**@Since 0.11.0**

In REST API design, GET method is used to query. If an ID is specified, it is used to query a single resource. The following setting could be visited with `/targets/1` in GET method.

* Java
Expand Down Expand Up @@ -160,6 +162,8 @@ server.resource("targets",

#### Get All

**@Since 0.11.0**

If no id specified, all related resource will be returned. The following setting could be visited with `/targets` in GET method.

* Java
Expand Down Expand Up @@ -190,6 +194,8 @@ server.resource("targets",

### POST

**@Since 0.11.0**

POST method is used to create new resource. The following setting could be visited with `/targets` in POST method.

* Java
Expand Down Expand Up @@ -220,6 +226,8 @@ server.resource("targets",

### PUT

**@Since 0.11.0**

PUT method is used to update a specified resource. The following setting could be visited with `/targets/1` in PUT method.

* Java
Expand Down Expand Up @@ -248,6 +256,8 @@ server.resource("targets",

### DELETE

**@Since 0.11.0**

DELETE method is used to delete a specified resource. The following setting could be visited with `/targets/1` in DELETE method.

* Java
Expand Down Expand Up @@ -278,6 +288,8 @@ server.resource("targets",

#### HEAD with ID

**@Since 0.11.0**

HEAD method is used to query resource metadata. If an ID is specified, it is used to query a single resource. The following setting could be visited with `/targets/1` in HEAD method.

* Java
Expand Down Expand Up @@ -308,6 +320,8 @@ server.resource("targets",

#### HEAD All

**@Since 0.11.0**

If no id specified, all related resource metadata will be returned. The following setting could be visited with `/targets` in HEAD method.

* Java
Expand Down Expand Up @@ -337,6 +351,8 @@ server.resource("targets",

### PATCH

**@Since 0.11.0**

PATCH method is used to update a specified resource. The following setting could be visited with `/targets/1` in PATCH method.

- Java
Expand Down Expand Up @@ -365,6 +381,8 @@ server.resource("targets",

### Sub-resource

**@Since 0.11.0**

Sub-resource is used to build relationship for resource. The following setting could be visited with `/targets/1/subs/1` in GET method.

* Java
Expand Down
2 changes: 1 addition & 1 deletion moco-doc/usage.md
Expand Up @@ -216,7 +216,7 @@ More socket APIs can be found [here](/moco-doc/socket-apis.md).

## JUnit Integration

**@Since will be at next release**
**@Since 0.11.0**

Moco provides JUnit integration to simplify the use of Moco in JUnit.

Expand Down

0 comments on commit 8560c3e

Please sign in to comment.