We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK: 1.8.0, 11, 12 pact-jvm-server: 3.5.15++ (issue raises perhaps with the merge of PR [#666])
A call to / delivers broken json response if a mock is created before.
/
bin\pact-jvm-server.bat --host 0.0.0.0 --mock-port-lower 30000 --mock-port-upper 30999 --pact-version 3 --debug 29999
curl --request POST \ --url 'http://localhost:29999/create?state=Basistestfixture&path=%2Fresource' \ --header 'content-type: application/json' \ --data '{ "consumer": { "name": "pact-consumer" }, "provider": { "name": "pact-provider" }, "interactions": [ { "description": "get time", "request": { "method": "GET", "path": "/resource/time/current", "query": { "locale": ["de"] } }, "response": { "body": { "time": "13:00:34.890" }, "status": 200 }, "providerStates": [ { "name": "Basistestfixture" } ] } ], "metadata": { "pact-specification": { "version": "3.0.0" } } }'
{ "port": 30633 }
http://localhost:29999/
curl --request GET --url http://localhost:29999/
Content-Type: application/json
{ "ports": [ 30633, /resource ] }
{ "ports": [ 30633, "/resource" ] }
path
ports
The text was updated successfully, but these errors were encountered:
/complete
fix: GET on pact-jvm-server root delivers broken json #938
c5a9e05
It will return {"ports": [30146], "paths": ["/resource"]} now
{"ports": [30146], "paths": ["/resource"]}
Sorry, something went wrong.
4.0.0 has been released with this fix
No branches or pull requests
Environment
JDK: 1.8.0, 11, 12
pact-jvm-server: 3.5.15++ (issue raises perhaps with the merge of PR [#666])
Description
A call to
/
delivers broken json response if a mock is created before.Example
bin\pact-jvm-server.bat --host 0.0.0.0 --mock-port-lower 30000 --mock-port-upper 30999 --pact-version 3 --debug 29999
curl --request POST \ --url 'http://localhost:29999/create?state=Basistestfixture&path=%2Fresource' \ --header 'content-type: application/json' \ --data '{ "consumer": { "name": "pact-consumer" }, "provider": { "name": "pact-provider" }, "interactions": [ { "description": "get time", "request": { "method": "GET", "path": "/resource/time/current", "query": { "locale": ["de"] } }, "response": { "body": { "time": "13:00:34.890" }, "status": 200 }, "providerStates": [ { "name": "Basistestfixture" } ] } ], "metadata": { "pact-specification": { "version": "3.0.0" } } }'
-> response:
{ "port": 30633 }
http://localhost:29999/
to retrieve all created mocks (ports):curl --request GET --url http://localhost:29999/
-> response: header:
Content-Type: application/json
; body:{ "ports": [ 30633, /resource ] }
(which not valid json)=> expected
{ "ports": [ 30633, "/resource" ] }
path
-fragment contained inports
array?The text was updated successfully, but these errors were encountered: