You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When \Templates\ODataPostManTests.tpl is used to generate the POST request, the url definition is incorrect and generates this in Postman (this screenshot shows the structure Supplier, but it fails for any structure):
When executing the generated test, Postman throws the error:
To reproduce
Run codegen against the above template, make sure that the POST request for the structure is enabled.
Expected behavior
The correct url should look like this:
Fix:
In the POST section of the template, the url definition is currently this:
"url": {
"raw": "{{ServerBaseUri}}/{{ODataPath}}/v{{ApiVersion}}/Suppliers", "host": [
"{{ODataPath}}",
"v{{ApiVersion}}",
"{{ServerBaseUri}}"
],
"path": [
"Suppliers"
]
}
It should be this (the bolded lines above are moved from the host section to the path section):
"url": {
"raw": "{{ServerBaseUri}}/{{ODataPath}}/v{{ApiVersion}}/Customers(Custno=123)",
"host": [
"{{ServerBaseUri}}"
], "path": [
"{{ODataPath}}",
"v{{ApiVersion}}",
"Customers(Custno=123)"
]
}
I've tested the above modification and it no longer throws the protocol error and it properly sends the request to the endpoint. This behavior is only in the POST request, all other requests appear to have correct url host and path definitions.
The text was updated successfully, but these errors were encountered:
Issue:
When \Templates\ODataPostManTests.tpl is used to generate the POST request, the url definition is incorrect and generates this in Postman (this screenshot shows the structure Supplier, but it fails for any structure):
When executing the generated test, Postman throws the error:
To reproduce
Run codegen against the above template, make sure that the POST request for the structure is enabled.
Expected behavior
The correct url should look like this:
Fix:
In the POST section of the template, the url definition is currently this:
"url": {
"raw": "{{ServerBaseUri}}/{{ODataPath}}/v{{ApiVersion}}/Suppliers",
"host": [
"{{ODataPath}}",
"v{{ApiVersion}}",
"{{ServerBaseUri}}"
],
"path": [
"Suppliers"
]
}
It should be this (the bolded lines above are moved from the host section to the path section):
"url": {
"raw": "{{ServerBaseUri}}/{{ODataPath}}/v{{ApiVersion}}/Customers(Custno=123)",
"host": [
"{{ServerBaseUri}}"
],
"path": [
"{{ODataPath}}",
"v{{ApiVersion}}",
"Customers(Custno=123)"
]
}
I've tested the above modification and it no longer throws the protocol error and it properly sends the request to the endpoint. This behavior is only in the POST request, all other requests appear to have correct url host and path definitions.
The text was updated successfully, but these errors were encountered: