simile proxy when you need to study a real service before you emulate it.
This is useful when a provider has no OpenAPI document or Simfile. It also helps when the published
contract leaves out errors or request and response details that your integration depends on.
Your application sends API requests to Simile. Simile forwards each request to the real service and
returns the real response. Add --learn to record these exchanges and create a draft Simile
service.
Start a learning session
http://127.0.0.1:8484. Set your application’s provider
base URL to that address.
What happens
- Your application calls the local Simile address.
- Simile forwards the call to
https://api.acme.com. - The real service sends its response to Simile.
- Simile returns that response to your application.
- Simile saves a sanitized record of the exchange.
What Simile can learn
From the traffic, Simile can identify:- HTTP methods and paths;
- query parameters and media types;
- request and response shapes;
- response statuses and public errors; and
- values that repeatedly travel from a request into its response.
behavior.hcl after the
learning session.
The draft improves as the evidence improves. Exercise successful calls, public errors, optional
inputs, and meaningful variations. Repeat calls when a request value should appear in the response.
Continue
- Proxy API calls shows how to connect your application.
- Review learned output explains the files Simile creates.
- Evidence and limits explains what Simile records and what the proxy currently supports.