Mocks
Mockgee Mock API Creation Options
- Importing API Specifications:
- Supports the import of API specification files, including Swagger, OpenAPI, WSDL, etc.
- Enables users to quickly generate mock APIs based on existing specifications for efficiency and accuracy.
- Manual Mock Creation:
- Allows users to manually create mock APIs with a high degree of flexibility.
- Features an intuitive user interface for a seamless mock creation experience.
- RESTful API Integration:
- Provides the option to create mocks by utilizing RESTful API capabilities.
- Streamlines the mock creation process by leveraging existing RESTful API structures.
Importing API Specifications
Mockgee expedites API mock creation with a user-friendly import feature, supporting diverse and open file formats like OpenAPI, WSDL, and Postman's Collection via file or URL. This streamlined approach ensures the quickest and most efficient mock development for swift API implementation.
The supported file formats:
- Open API(Swagger 2)
- WSDL
- Postman's Collection v2
- Native CSV
- Native JSON
Video on using importer
Manual Mock Creation
Mockgee's user-friendly interface streamlines manual API mock creation, offering enhanced user experience, flexibility, and extensive customization options.
This allows users to precisely tailor API mocks to their specifications, ensuring a seamless and adaptable development process.
To manually create a mock in Mockgee, follow these steps:
- Navigation:
- In the navigation panel, expand the "Mock" section and click on "Add."
- HTTP Method and Endpoint:
- In the "Add" page, select the HTTP method from the dropdown and provide the endpoint path, including any query parameters.
- Project Details:
- Navigate to the first tab to specify the project name and description.
- Response Configuration:
- Click on the "Response" tab and perform the following:
- Define HTTP response headers.
- Specify the response body format (JSON, XML, SOAP).
- Choose the HTTP status code from the dropdown.
- Click on the "Response" tab and perform the following:
- Request Matcher Configuration:
- Click on the "Request Matcher" tab and configure matching options such as request headers or payload. Mockgee provides powerful filtering options:
- Match full payload.
- Match only a specific field from the payload.
- Ignore the full payload.
- Click on the "Request Matcher" tab and configure matching options such as request headers or payload. Mockgee provides powerful filtering options:
- Advanced Settings:
- Move to the "Advanced Settings" tab and configure:
- Map: Utilize the powerful feature to return request fields in the mock response.
- Configure delay in the mock response to replicate unresponsive scenarios.
- Move to the "Advanced Settings" tab and configure:
By following these steps, you can manually create a mock in Mockgee with detailed configurations for response handling, request matching, and advanced settings.
RESTful API Integration
Mockgee provides a RESTful API for the creation and management of API mocks, allowing seamless integration with existing tools and CI/CD pipelines. To leverage the RESTful API, adhere to the following steps:
- Obtain the Open API file outlining the API specifications.
- Generate the API for authentication mechanization.
This approach enables users to programmatically interact with Mockgee, facilitating efficient incorporation of API mock functionalities into diverse workflows and development processes.