Generative response body #157
matheusfrancisco
started this conversation in
Ideas
Replies: 1 comment
-
I like the idea of implementing a scheme that makes the api return "dynamic" we can use a ready-made library to dynamically generate the returns, e.g. faker - endpoint:
# Note: the method could be omitted because GET is the default
method: GET
path: /hello/:username
response:
status: 200
body: {"name": "{{faker/names}}"}
(ns test
(:require [faker.name :as name])
(:use faker.name faker.lorem))
(println name.names) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was thinking we could add something to use generative schema.
I define the body schema from the yaml and I generate random body for it.
every call we will generate a random output body {"hello": "name"}
Beta Was this translation helpful? Give feedback.
All reactions