Mockend
#
InstallationInstall Mockend GitHub app on your repo. For the rest of the docs, we'll consider it's org/repo
.
Create a .mockend.json
file to describe your API.
#
ConfigurationSupported types are: string
, int
, boolean
and date
.
You can also describe has many
and belongs to
relations.
For example:
#
RoutesFor REST, based on the previous config, the following routes will be created:
Routes can take query parameters, see below.
GraphQL, will be available at:
Mockend supports Git branches, you can therefore have multiple mock APIs for different features on the same repo.
Simply add tree/:branch_name
to your URL, for example:
#
Queries#
RESTQuery parameters can be used to filter, sort and paginate lists:
_eq
_ne
- equal, not equal
_gt
_lt
- greater than, lower than
_order
- sort data (
asc
desc
)
- sort data (
limit
offset
- use them to paginate your results
For example:
#
GraphQLA GraphiQL interface, with specific documentation for your API, can be found directly at:
#
QuestionsIf you have a question or feedback, feel free to contact us.