Comments (1)
@rubensa The current behavior you outlined is the correct behavior and there is no issue with it.
This request body:
{
"property1": [],
"property2": [1, 2]
}
matches the second child of the anyOf because it is lacking additionalProperties: false
. Because that schema allows for additional properties to be present, the property1
is considered an additionalProperty, even though it matches the first anyOf child's schema. You'd get the same behavior if the request body contained something random, that doesn't match the first anyOf child:
{
"somethingRandom": 1,
"property2": [1, 2]
}
You can check this in any online json schema validator, (e.g. https://www.jsonschemavalidator.net/).
from prism.
Related Issues (20)
- An invalid schema will cause the validation proxy to always pass HOT 1
- query parameter name with "[]" not work on prism proxy
- Same URLs with differently typed path variables does not route correctly HOT 2
- Prism misvalidate boolean query params HOT 1
- [NOT A BUG -> QUESTION] how to set fix path variables HOT 2
- Add dynamic mocking to proxy
- Unable to build binary on node.js 20 HOT 2
- Enable Multi arch Build in DockerHub HOT 1
- Prism Proxy Request Violation for Valid oneOf Schemas HOT 2
- Accept array parameters in request body regardless of name convention HOT 2
- Prism Proxy is not working as expected for binary content types image/jpeg and application/pdf HOT 3
- Refactor Pino Logger usage to allow any logger
- Proxy is not validating against the correct response schema when using accept header for versioning HOT 3
- Docker images fail on startup when api specification.yml is specified HOT 1
- Prism docker image vulnerabilities HOT 1
- AdditionalItems never returned in response HOT 2
- Prism proxy returns 401 when the actual response from the server is 403 HOT 3
- Facilitate fully dynamic response generation by default in "prism proxy" scenario HOT 2
- Missing response validation HOT 2
- How to run and maintain Prism mock server on Azure Devops pipeline (Linux agents) with powershell HOT 1
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 prism.