Skip to content

tsaikd/go-raml-mocker

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

go-raml-mocker Build Status Report card

RAML (1.0) web mock server implementation in golang

Features

  • Live reload web mock server routes from RAML file

Use pre-build binary from docker hub

  • start mock web server
docker run \
	-p 4000:4000 \
	-v "${PWD}/example/organisation-api.raml:/raml/organisation-api.raml" \
	tsaikd/go-raml-mocker:1.0 \
	go-raml-mocker -f /raml/organisation-api.raml --port 4000
  • try to get data from mock web server
curl http://localhost:4000/organisation
curl http://localhost:4000/organisation \
	-XPOST \
	--header "UserID: SWED-123" \
	--header "Content-Type: application/json" \
	-d '{"name":"Bob"}'

Use pre-build binary (Linux x86_64)

Download from gihub

  • See release for all available versions
curl 'https://github.com/tsaikd/go-raml-mocker/releases/download/1.0.2/go-raml-mocker-Linux-x86_64' -SLo go-raml-mocker && chmod +x go-raml-mocker

Usage

  • start mock web server
go-raml-mocker -f example/organisation-api.raml --port 4000
  • try to get data from mock web server
curl http://localhost:4000/organisation

Use golang binary from github source code

go get -u -v "github.com/tsaikd/go-raml-mocker"

Show all configuration

go-raml-mocker -h

About

RAML (1.0) web mock server implementation in golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published