Generate your mock API automatically from a Swagger or OpenAPI definition.
/people/abc123
and a required query parameter of fields=summary
.
The other will have a URL path equal to /people/cba321
and a required query parameter of fields=full
.
Any values not specified in this manner will be randomly generated based on the parameter’s schema.
format
if present, but if not making a guess based on the field name. For instance,
a string
attribute named date_of_birth
will result in the generation of an ISO8601 local
date within the past 99 years e.g. 1971-08-02
.
However, you can override this behaviour and specify which data generation strategy should be used.
WireMock Cloud uses Faker to generate example data, and
you can specify the specific faker to use by adding an x-faker
attribute to your schema element e.g.
name.name
name.first_name
name.last_name
name.name_with_middle
name.title
name.prefix
name.suffix
name.username
id.alphanumeric_id
id.uuid
date_and_time.birthday
date_and_time.past_date_time
date_and_time.future_date_time
uri.url
lorem.word
lorem.sentence
lorem.paragraph
currency.code
address.street_address
address.secondary_address
address.city_name
address.state
address.postcode
country.name
country.code2
country.code3
phone_number.phone_number
avatar.image
note Only required query parameters will be included in the stubs’ request criteria. Non-required query parameters will excluded, meaning that any or no value will be accepted.