openwallet-foundation / credo-ts-ext

Extension libraries for Credo
https://credo.js.org
Apache License 2.0
29 stars 37 forks source link

[rest] OpenAPI validations for nested objects #17

Closed janrtvld closed 2 years ago

janrtvld commented 3 years ago

OpenAPI validation is currently not working because it fails to validate nested objects.

This can be resolved by implementing class-validator decorators in AFJ. https://github.com/hyperledger/aries-framework-javascript/pull/360

brianorwhatever commented 2 years ago

@janrtvld Is this why I am seeing a

{
  ...,
  "constraints": {
      "isInstance": "each value in requestedPredicates must be an instance of ProofPredicateInfo",
      "isMap": "requestedPredicates must be a Map"
  }
}

error whenever I try to interact with the request proof endpoint? I have tried a number of things for the requestedPredicates and requestedAttributes fields but am not able to pass validation..

TimoGlastra commented 2 years ago

What is the payload you're sending to the rest API?

TimoGlastra commented 2 years ago

Is this fixed by #148?

janrtvld commented 2 years ago

Yes, we have removed the properties that aren't working (Routing & Attachment)