Same as publishing API documents, you can publish a mock server from API Repository at any point of the git history. We will use scripts files under 'apigit-mock' folder to truly deploy a mock server sandbox in our cloud for your access.
Same as API document, there are three places to publish a mock server in an API Repository page:
- Method 1: Click the 'Publish' button will publish a mock server by using the latest ('HEAD') scripts files under the 'apigit-mock' folder.
- Method 2: Click the 'History' button, and then publish from the latest commit in the list as a mock server.
- Method 3: Click the 'History' button and go to 'All Commits' page. You can select any commit to publish a mock server from the whole history of the API repository.
- Method 4: In Mock scripts editing mode, you can directly published a mockserver from a recent commit. This is very useful. You can use it to write or debug your mock scritps as you don't need to exit the edit mode.
In the publish Mock Server dialog, you can set the domain name for this cloud mock server sandbox. All these information can also be modified in the Mock server setting page later.
Once you published a mock server, you can navigate to the Mock Server Center page, and click one mock server to enter its console to review its information, like access logs, state, routes ...
Click one of the published mock servers. You will enter that mock server's console page.