api-validator
api-validator copied to clipboard
Provide helpers that validate a request against an OpenAPi/Swagger2 API description
Any idea what it would take to support OpenAPI 3? I assume it would impact request/response definition at minimum. Have this been explored at all?
I attempted to load the official Swagger example "PetStore" into this tool and it failed: ``` Fatal error: Uncaught InvalidArgumentException: formData is not a valid parameter location in vendor/eleven-labs/api-validator/src/Definition/Parameters.php on...
MessageValidator class: ``` public function validateMessageBody(MessageInterface $message, MessageDefinition $definition) { if ($message instanceof ServerRequestInterface) { $bodyString = json_encode((array) $message->getParsedBody()); } else { $bodyString = (string) $message->getBody(); } if ($bodyString !==...