Skip to main content

Generating Interfaces

info

Mocktail is still in Beta so if you find any bugs with the app or issues with these docs, please report them on GitHub

Once you have saved an endpoint, Mocktail allows you to generate Typescript interfaces for the response body. To do this, simply press the 3 dots button in the top right of the response panel of your endpoint. From this menu select "Generate interface (Last saved)".

Endpoints action menu with View Output highlighted

A new window will open with the example output. If you make any changes to the response body, you can click the refresh button at the top right of this window to regenerate them. You can also copy the interfaces to your clipboard by clicking the clipboard button next to refresh button.

Window with example output