Skip to content

alperaktas-ets/mockend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Config

Create a .mockend.json file with the following basic config:

==github.com/alperaktas-ets/mockend/.mockend.json==

{
	"User": {
		"title": { "string": {} }
	}
}

Try It

Try the new mock server:

# 1. List your fake users with a GET request
curl https://mockend.com/org/repo/users

# 2. Fake a creation with a POST
# (don't worry changes aren't persisted)
curl https://mockend.com/org/repo/users \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"name": "alice"}'

Random Generator Config

==github.com/alperaktas-ets/mockend/.mockend.json==

{
	"User": {
		"name": {
			"string": {}
		},
		"avatarUrl": {
			"regexp": "https://i\\.pravatar\\.cc/150\\?u=[0-9]{5}"
		},
		"statusMessage": {
			"string": ["working from home", "watching Netflix"]
		},
		"email": {
			"regexp": "#[a-z]{5,10}@[a-z]{5}\\.[a-z]{2,3}"
		},
		"color": {
			"regexp": "#[0-9A-F]{6}"
		},
		"age": {
			"int": {
				"min": 21,
				"max": 100
			}
		},
		"isPublic": {
			"boolean": {}
		}
	}
}

About

Fake API endpoints built with Mockend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published