4nth0 / golem

From a single config file Golem start a mock server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Golem able to auto-generate mocks

4nth0 opened this issue · comments

Golem is able to send pre-defined mocks but is unable to generate automatic mocks.
With the help of Faker solutions such as https://github.com/brianvoe/gofakeit Golem should generate mocks on the fly depending on YAML declaration of the expected mock scheme :

port: "8181"
services:
  - name: "Autogen Mocks"
    http_config:
      routes:
        "/posts":
          generate:
            scheme:
              "title":
                type: LoremIpsumSentence
                word_count: 3
              "content":
                type: LoremIpsumParagraph
                word_count: 3
              "views":
                type: Number
                min: 0
                max: 99
              "published":
                type: boolean