Why you want to use SwaggerOpenAPI for your REST API
Swagger is a specification of a REST API.
It is now the base of the Open API Initiative supported by a number of companies
You don't need to write the validation yourself, but it helps to understand how it is done. I'll show you an example and some pitfalls you should be aware of.
I created an example git repository I'll use in my talk:
https://github.com/perlpunk/dancer-swagger-example-p5
Currently Mojolicious and Dancer2