Help with Additional Properties #2700
Unanswered
DevinSchwehr
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a project and using Adyen for part of it. I am using their official java library that can be found at
https://github.com/Adyen/adyen-java-api-library
I am trying to create a mock server to test against using their official OpenAPI files, the one I am currently testing against can be found here:
https://raw.githubusercontent.com/Adyen/adyen-openapi/main/yaml/LegalEntityService-v3.yaml
The problem that I am running into is when using their library and trying to create an individual Legal Entity, I get an object that looks like this:
LegalEntityInfoRequiredType { capabilities: {} entityAssociations: [] individual: class Individual { birthData: null email: [email protected] identificationData: null name: class Name { firstName: Shelly infix: null lastName: Eller } nationality: null phone: null residentialAddress: class Address { city: null country: US postalCode: null stateOrProvince: null street: null street2: null } taxInformation: [] webData: null } organization: null reference: null soleProprietorship: null trust: null type: individual unincorporatedPartnership: null verificationPlan: null }
But when the request goes to the Prism mock server at
/legalEntities
, I get this error:[HTTP SERVER] post /legalEntities ℹ info Request received 2025-04-29 10:27:27 [4:27:27 PM] › [VALIDATOR] ⚠ warning Request did not pass the validation rules 2025-04-29 10:27:27 [4:27:27 PM] › [VALIDATOR] ✖ error Request body must NOT have additional properties; found 'capabilities' 2025-04-29 10:27:27 [4:27:27 PM] › [NEGOTIATOR] ✔ success Found response 422. I'll try with it. 2025-04-29 10:27:27 [4:27:27 PM] › [NEGOTIATOR] ✔ success The response 422 has a schema. I'll keep going with this one 2025-04-29 10:27:27 [4:27:27 PM] › [NEGOTIATOR] ✔ success Responding with the requested status code 422 2025-04-29 10:27:27 [4:27:27 PM] › [NEGOTIATOR] ℹ info > Responding with "422" 2025-04-29 10:27:27 [4:27:27 PM] › [VALIDATOR] ✖ error Violation: request.body Request body must NOT have additional properties; found 'capabilities'
When I look at the yaml file, for
LegalEntityInfoRequiredType
I see that capabilities is a listed property. When I download the file and turn all additionalProperties to true, the test passes and works as expected. Is this an error with the openapi documentation or am I missing something?Beta Was this translation helpful? Give feedback.
All reactions