зеркало из
https://github.com/iharh/notes.git
synced 2025-10-30 21:26:09 +02:00
m
Этот коммит содержится в:
родитель
2c685e16e1
Коммит
c9b29a8f18
@ -5,3 +5,35 @@ https://docs.spring.io/spring-cloud-contract/docs/current/reference/html/project
|
|||||||
|
|
||||||
2022
|
2022
|
||||||
https://vc.ru/u/628653-codeinside/535563-mock-servisy-dlya-testirovaniya-how-to-use-quick-start
|
https://vc.ru/u/628653-codeinside/535563-mock-servisy-dlya-testirovaniya-how-to-use-quick-start
|
||||||
|
|
||||||
|
samples
|
||||||
|
{
|
||||||
|
"request": {
|
||||||
|
"method": "POST",
|
||||||
|
"urlPattern": "/v1/.+/suff",
|
||||||
|
"bodyPatterns": [
|
||||||
|
{
|
||||||
|
"matchesJsonPath": "$[?($.ActivityType == 'SOMEACT')]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"response": {
|
||||||
|
"fixedDelayMilliseconds": 90,
|
||||||
|
"status": 201,
|
||||||
|
"headers": {
|
||||||
|
"Content-Type": "application/json;charset=UTF-8"
|
||||||
|
},
|
||||||
|
"jsonBody": {
|
||||||
|
"SomeInput": {
|
||||||
|
"SomeNumber": "{{jsonPath request.body '$.ActivityInput.CertificateNumber'}}"
|
||||||
|
},
|
||||||
|
"SomeId": "{{request.path.[1]}}",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
https://docs.wiremock.io/response-templating/random-values/
|
||||||
|
{{randomValue type='UUID'}}
|
||||||
|
{{randomValue length=27 type='ALPHABETIC' uppercase=true}}
|
||||||
|
|
||||||
|
https://docs.wiremock.io/response-templating/json/#iterating-over-json-elements
|
||||||
|
|||||||
Загрузка…
x
Ссылка в новой задаче
Block a user