Aquesta és una versió anterior. La versió actual és la 2.8.10. Mockzilla 2.8.10 · Data de publicació:
Fitxers d’instal·lació 2.8.1
| Arquitectura | Tipus | Àmbit | Mida del fitxer | Baixa | SHA256 |
|---|---|---|---|---|---|
| 64 bits | Portable | — | — | github.com | VirusTotal |
| ARM64 | Portable | — | — | github.com | VirusTotal |
L’enllaç i l’SHA256 provenen del manifest comunitari del Gestor de paquets del Windows. Convé comparar el hash del fitxer baixat abans d’executar-lo.
Notes de la versió
What's Changed
Take response values from the incoming request by @jbn2336mz in #56
Context values can be pulled out of the request being answered, using a dotted path into its payload:
charge:
currency: "request:order.payment.amount.currency"
amount: "request:order.payment.amount.value"
Post an order with EUR and 10.5 and the mock answers with EUR and 10.5 instead of random data. Array elements are addressed by index: request:order.amounts[0].currency.
- Works wherever contexts work: service context.yml, the X-Mockzilla-Context header, the UI context editor, and inside area blocks such as in-response.
- JSON and form-encoded requests are both read; the Content-Type header decides. Form bodies keep their nesting, so order[payment][currency]=EUR is reached with request:order.payment.currency.
- A path that matches nothing falls back to generated data, and the value has to fit the schema of the field it fills.
Fix response header generation by @jbn2336mz in #57
An in-response-header block used to be ignored, so headers meant to carry a fixed request id or trace id came back as random words. Those blocks now take effect, and in-response applies to response headers too.
Headers declared readOnly in the spec were dropped and sent as the literal text <nil>; they now appear with their value. Headers declared writeOnly were sent as <nil> as well; they are now omitted.
The documented area priority never matched the actual behavior, for requests as well as responses. The real chain is:
in-request-header > in-request > in-header > root
in-response-header > in-response > in-header > root
A header falls back to its direction (in-request / in-response) before the direction-agnostic in-header.
Full Changelog: v2.8.0...v2.8.1