-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding demo for extension functionality
- adding sample Vue frontend - adding WireMock docker configuration for demo - udpate README.md
- Loading branch information
Showing
45 changed files
with
8,586 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="WireMock Docker Demo" type="docker-deploy" factoryName="docker-image" server-name="Docker"> | ||
<deployment type="docker-image"> | ||
<settings> | ||
<option name="imageTag" value="wiremock/wiremock:3x" /> | ||
<option name="command" value="--global-response-templating --verbose" /> | ||
<option name="containerName" value="wiremock-extension-state-test" /> | ||
<option name="portBindings"> | ||
<list> | ||
<DockerPortBindingImpl> | ||
<option name="containerPort" value="8080" /> | ||
<option name="hostPort" value="8080" /> | ||
</DockerPortBindingImpl> | ||
</list> | ||
</option> | ||
<option name="volumeBindings"> | ||
<list> | ||
<DockerVolumeBindingImpl> | ||
<option name="containerPath" value="/var/wiremock/extensions" /> | ||
<option name="hostPath" value="$PROJECT_DIR$/build/libs" /> | ||
<option name="readOnly" value="true" /> | ||
</DockerVolumeBindingImpl> | ||
<DockerVolumeBindingImpl> | ||
<option name="containerPath" value="/home/wiremock" /> | ||
<option name="hostPath" value="$PROJECT_DIR$/demo/stubs" /> | ||
</DockerVolumeBindingImpl> | ||
</list> | ||
</option> | ||
</settings> | ||
</deployment> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"id": {{randomInt lower=1 upper=10000}}, | ||
"title": "{{jsonPath request.body '$.title'}}", | ||
"description": "{{jsonPath request.body '$.description'}}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ | ||
{{# each (state context='todolist' property='list' default='[]') }} | ||
{ | ||
"id": {{id}}, | ||
"title": "{{title}}", | ||
"description": "{{description}}" | ||
}{{#unless @last}},{{/unless}} | ||
{{/each}} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"mappings": [ | ||
{ | ||
"request": { | ||
"urlPathPattern": "/api/v1/profile", | ||
"method": "GET" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"firstName": "{{state context='profile' property='firstName' default=''}}", | ||
"familyName": "{{state context='profile' property='familyName' default=''}}", | ||
"street": "{{state context='profile' property='street' default=''}}", | ||
"city": "{{state context='profile' property='city' default=''}}" | ||
}, | ||
"headers": { | ||
"content-type": "application/json" | ||
} | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"urlPathPattern": "/api/v1/profile", | ||
"method": "POST" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"jsonBody": { | ||
"firstName" : "{{jsonPath request.body '$.firstName'}}", | ||
"familyName" : "{{jsonPath request.body '$.familyName'}}", | ||
"street" : "{{jsonPath request.body '$.street'}}", | ||
"city" : "{{jsonPath request.body '$.city'}}" | ||
}, | ||
"headers": { | ||
"content-type": "application/json" | ||
} | ||
}, | ||
"serveEventListeners" : [ { | ||
"name" : "recordState", | ||
"parameters" : { | ||
"state" : { | ||
"firstName" : "{{jsonPath request.body '$.firstName'}}", | ||
"familyName" : "{{jsonPath request.body '$.familyName'}}", | ||
"street" : "{{jsonPath request.body '$.street'}}", | ||
"city" : "{{jsonPath request.body '$.city'}}" | ||
}, | ||
"context" : "profile" | ||
} | ||
} ] | ||
} | ||
] | ||
} |
Oops, something went wrong.