Public | Automated Build

Last pushed: 2 years ago
Short Description
Run a webserver from docker which simulates api responses based on blueprint api documentation
Full Description

API-Mock Docker image

Run a api-doc application in docker.

Document your API in the API blueprint format, and API-Mock mocks your routes and sends the responses defined in the api spec.

See more about the application:


# /messages

Retrieve messages

## GET
+ Response 200 (text/plain)

        Hello World!
        Hello Other World

# /messages/{id}
Represents a particular message by it's *id*.

## Retrieve message [GET]
+ Response 200 (text/plain)

        Hello World!

+ Response 204

# /messages/{id}.json

## Retrieve message in JSON [GET]
+ Response 200 (application/json)

        {"message": "Hello World!"}

Run in shell:

$  docker run -ti --rm -v $PWD/ -p 3000:3000 ajnasz/api-mock

Then to test by calling a GET request:

$ curl -v localhost:3000/messages/123

There you can see the response

Then to test by calling a DELETE request:

$ curl -v -X DELETE localhost:3000/messages/123
Docker Pull Command
Source Repository

Comments (0)