Implementing Simple Mock Response Data

To add a simple mock response:

  1. Go to the Mock app Details Page for a running Mock app.
  2. Click the Implementation tab.

  3. Click the response card in the Simple Mock Responses section.
  4. Add the mock response using the following options:
    • If no response data is defined, enter the response data and click Save.
      Note: The added response mock data does not affect the API specification.

    • If a reference response schema is defined, click Generate response from schema to generate the response data based on the defined schema. Click Save.
      Note: If the defined response schema is String, the Generate response from schema link is not displayed.

    • If a response example is defined, click Revert to example from spec to use the defined response example. Click Save.
  5. Click Update Mock app to redeploy the Mock app. You are directed back to the Apps page.

After deploying the Mock app, you can test the app against the mock data. For more details, see Testing an API Mock App.