DEV Community

Discussion on: What's an Open Source Project You Think Deserves More Support?

Collapse
 
avelino profile image
Thiago Avelino

GitHub logo avelino / moclojer

Simple and efficient HTTP mock server with specification in yaml, edn or OpenAPI

moclojer

moclojer

Simple and efficient HTTP mock server with specification in yaml, edn or OpenAPI.

💾 Download the binary with the latest version of moclojer to test on your computer here.

tests linter

📖 See the complete documentation for moclojer here, if you want to contribute (or complement) the documentation, it is here.

YAML example

# This mock register route: GET /hello/:username
- endpoint:
    # Note: the method could be omitted because GET is the default
    method: GET
    path: /hello/:username
    response:
      # Note: the status could be omitted because 200 is the default
      status: 200
      headers:
        Content-Type: application/json
      # Note: the body will receive the value passed in the url using the
      # :username placeholder
      body: >
        {
          "hello": "{{path-params.username}}!"
        }
Enter fullscreen mode Exit fullscreen mode

docker

image: ghcr.io/avelino/moclojer:latest

docker run -it \
  -v $(pwd)/moclojer.yml:/app/moclojer.yml \
  ghcr.io/avelino/moclojer:latest
Enter fullscreen mode Exit fullscreen mode

💻 dev environment

We use…