Faker data generator, built around the faker ruby gem.
Can generate names, addresses, phone numbers and much more. Also comes with support for various locales.
Execute the microservice container with the following command :
docker run -ti -p 9902:80 msagency/msa-faker
$ curl http://localhost:9902/faker/name
Warren Bins
$ curl http://localhost:9902/faker/name?locale=fr
Noémie Clement
$ curl http://localhost:9902/faker/address/city?locale=sv
Östertuna
The locale parameter can be optionally supplied to any endpoint to change the locality of the generated data. This has mainly an effect on the endpoints like /faker/name and /faker/address, but will probably not change anything on endpoints like /faker/code or /faker/internet. You can check the support for each locale at https://github.com/stympy/faker/tree/master/lib/locales, and get the list with:
- GET /faker/locales : Get the list of supported locales
Check out the swagger docsfor the full list of endpoints. Here are the main ones :
- GET /faker/name
- GET /faker/phone-number
- GET /faker/address/city
- GET /faker/address/street-name
- GET /faker/address/zip-code
- GET /faker/address/time-zone
- GET /faker/address/state
- GET /faker/address/country
- GET /faker/business/credit-card/number
- GET /faker/commerce/department
- GET /faker/company/name
- GET /faker/company/catch-phrase
- GET /faker/company/duns
- GET /faker/book/title
- GET /faker/book/author
- GET /faker/book/publisher
- GET /faker/educator/university
- GET /faker/educator/secondary-school
- GET /faker/team/name
- GET /faker/team/sport
- GET /faker/bitcoin/address
- GET /faker/codes/isbn
- GET /faker/codes/imei
- GET /faker/color/hex
- GET /faker/color/rgb
- GET /faker/color/hsl
- GET /faker/internet/email
- GET /faker/internet/domain-name
- GET /faker/internet/ipv4
- GET /faker/internet/ipv6
- GET /faker/file/name
- GET /faker/file/extension
- GET /faker/file/mime-type
- GET /faker/hacker/abbreviation
- GET /faker/crypto/md5
- GET /faker/crypto/sha1
- GET /faker/crypto/sha256
- GET /faker/app/name
- GET /faker/slack-emoji
- GET /faker/superhero/name
- GET /faker/starwars/character
- GET /faker/starwars/planet
- GET /faker/space/planet
- GET /faker/space/moon
- GET /faker/space/agency
- GET /faker/gameofthrones/character
- GET /faker/pokemon/name
- GET /faker/beer/name
- GET /faker/beer/alcohol
- GET /faker/lorem/paragraphs
- GET /faker/hipster/paragraphs
- GET /ms/version : returns the version number
- GET /ms/name : returns the name
- GET /ms/readme.md : returns the readme (this file)
- GET /ms/readme.html : returns the readme as html
- GET /swagger/swagger.json : returns the swagger api documentation
- GET /swagger/#/ : returns swagger-ui displaying the api documentation
- GET /nginx/stats.json : returns stats about Nginx
- GET /nginx/stats.html : returns a dashboard displaying the stats from Nginx
A project by the Microservices Agency.