Request body property is coerced e.g. ("123" coerced to123)
See original GitHub issueHi, I am using openapi: 3.0.2 with express-openAPI-validator ^2.0.0 I am getting the following problem: When I am using
new OpenApiValidator({
apiSpec: this.openApiPath,
validateResponses: false,
**validateRequests:** true,
}).install(this.app);
its changing the integer values to string like
body: { a: 1}
and I am getting
body: {a:"1"}
Please fix this problem as I am getting validation issue due to this
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (8 by maintainers)
Top Results From Across the Web
How does type coercion with "+string" work in Javascript?
As the ECMAScript spec describes in section 12.5.6: 12.5.6 Unary + Operator. NOTE The unary + operator converts its operand to Number type....
Read more >CoerceValueCallback Delegate (System.Windows)
Provides a template for a method that is called whenever a dependency property value is being re-evaluated, or coercion is specifically requested.
Read more >10. Destructuring - Exploring JS
The parts of an object pattern are properties, the property values are again patterns (recursively). Array pattern. For example: [ «pattern», «pattern» ]....
Read more >Introduction to FXML | JavaFX 8.0 - Oracle Help Center
The document introduces FXML, an XML-based declarative markup language for defining user interfaces in JavaFX 8.0 applications.
Read more >Type Coercion with DataWeave - MuleSoft Documentation
In DataWeave, types can be coerced from one type to other using the as operator. Type coercion takes place at runtime. Before you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chittolina would you be interested in taking the first pass at solving this?
Some pointers:
coerceTypes: false
.body
coerceTypes:false
), and validates only thebody
Note: to quickly get a development environment setup, you can follow the instructions in [CONTRIBUTING.md]. You can also click the Gitpod button at the top of this issue or the Gitpod badge in the README.md to setup a cloud dev env in one click.
fixed in
v4.1.0