Closed ganeshnikam18 closed 8 months ago
Hi @ganeshnikam18. Headers file syntax implies that headers are sub-elements of paths and all
, not array values like in your example. This is why it crashes. It's probably a good idea to change a bit the message to suggest that it's an issue with the syntax.
@en-milie Ok. Got it. The content of the header.yaml file should be as below:
all: X-API-Key : abc123
It will then be converted to Object, Instead of ArrayList.
Sorry for the incorrect bug
It should be as follows:
all:
X-API-Key: abc123
Notice the indentation of the X-API-Key
. It needs 2 spaces in order to be a sub-element of all
.
Yes. Thanks for the clarification
Closing this.
Describe the bug If we give header.yaml file as a input on the cats command line then we get below exception:
[**][*] ▶ Starting cats-11.0.1-SNAPSHOT, build time 2024-02-28T18:40:31Z UTC, platform Linux-6.5.0-21-generic-amd64 [**][*] ⚙ Headers file: /cats/header.yml [**][***] ‼ Something went wrong while running CATS: java.lang.IllegalArgumentException: Cannot deserialize value of type
java.util.LinkedHashMap<java.lang.Object,java.lang.Object>
from Array value (tokenJsonToken.START_ARRAY
) at [Source: UNKNOWN; byte offset: #UNKNOWN]This exception will come for any FileArguments like: --header, --refData --urlParam
Steps To Reproduce Steps to reproduce the behaviour:
Expected behaviour The headers.yaml file should be read properly and those headers should be sent in the request.