Comments (8)
Hi @josip1001. Is everything ok with 7.2.1?
from cats.
Hi @josip1001. Thank you for raising this. I'm struggling though to reproduce it. If I run the above command using the provided OpenAPI contract, I get payloads like this:
{
"amount": "7.50",
"petUid": "eqnpkbeh",
"name": "7qEow",
"hashtag": "rdTbbpCNB"
}
Which version of CATS are you using?
from cats.
Hi, I am using latest version(7.2.0) and I have still got same error :
{
"responseCode": 400,
"httpMethod": "POST",
"jsonBody": {
"status": "error",
"error": {
"message": "The type of the "amount" attribute for class "App" must be one of "float" ("string" given).",
"code": "validation_error",
"context": [],
"reason": "UNKNOWN"
}
},
"responseTimeInMs": "10373",
"numberOfWordsInResponse": "16",
"numberOfLinesInResponse": "1",
"contentLengthInBytes": "289"
}
====================
payload:
{
"amount": "3,48",
"petUid": "67DuR9XimWncU8",
"name": "PfGe5C5YTXzY",
"hashtag": "2v1fspX"
}
from cats.
This seems like a misalignment between the locale of the server and the locale of your machine. The server expects data in locale en_us most probably so the amount must be something like: 5.6
. Notice the .
instead of ,
like in your example. In order to pass the locale to the app just do:
> java -Duser.language=en -jar cats-uber.jar --contract=c:\Work\pet\pet1.json --server=https://process.example.com/ --fuzzers=HappyFuzzer
from cats.
when i was using Param " -Duser.language=en" value of amount contains "." instead of "," but amount is still sending with quotation marks ("") and i have still got response:
{
"responseCode": 400,
"httpMethod": "POST",
"jsonBody": {
"status": "error",
"error": {
"message": "The type of the "amount" attribute for class "App" must be one of "float" ("string" given).",
"code": "validation_error",
"context": [],
"reason": "UNKNOWN"
}
},
"responseTimeInMs": "10522",
"numberOfWordsInResponse": "16",
"numberOfLinesInResponse": "1",
"contentLengthInBytes": "289"
}
=======================
Payload:
{
"amount": "4.11",
"petUid": "2UqgiSmlmbOe",
"name": "LkaBFjtEgdc",
"hashtag": "2r20kA3"
}
from cats.
Usually frameworks in most of the languages will automatically convert string to appropriate types from the backed object. I've changed though to leave every numeric field as Number
. 7628067
Will be available in the next release.
from cats.
Hi @josip1001. You can try with https://github.com/Endava/cats/releases/tag/cats-7.2.1 release.
from cats.
thanks for fix...it's working well right now
from cats.
Related Issues (20)
- [FunctionalFuzzer] Warning on nullable enum HOT 2
- [Bug]: Path parameters are not fuzzed for PUT/PATCH/POST methods HOT 6
- MinimumExactNumbersInNumericFieldsFuzzer MaximumExactNumbersInNumericFieldsFuzzer fuzzers fuzz values as "string" not as schema data type HOT 3
- NullPointerException when traing to run app HOT 3
- CountryCode regex pattern is not honoured HOT 3
- Very long string is getting generated for "zip" (zip code/pin code) field HOT 3
- Ip Address value is not generated properly HOT 2
- Regex match on --path HOT 1
- java.lang.IllegalArgumentException When header.yaml file is given as input HOT 5
- Link fuzzer reports with actual vulnerabilities HOT 2
- README has not got enough information. HOT 1
- The project structure seems a bit confusing HOT 2
- execution handling in readme file HOT 1
- README translation HOT 1
- For some spec files cyclic redundancy check goes into infinite loop HOT 3
- Error when fuzzing `Expected to find an object with property ['th'] in path $['th'] but found 'net.minidev.json.JSONArray'` HOT 2
- windows : i use command java -jar cats.jar on the cmd . but there is nothing ! HOT 1
- Does exist a Docker compose example with something like PetClinic to test the cats? HOT 1
- `java.lang.NullPointerException` when fuzzing HOT 5
- No option to specify how long should fuzzer runs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cats.