You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I’m new to oapi-codegen, but I’m familiar with code generation tools and the idea of generating types, server and client boilerplate code coming from the gRPC/Proto ecosystem. That’s why I really like this tool.
Right now, I’m trying to figure out how to implement validation logic, does oapi-codegen support this directly, or would I need to create middleware of type strictnethttp.StrictHTTPMiddlewareFunc?
Also, is it possible to apply validations using JSON Schema rules (e.g., pattern, format, length, etc.) rather than creating validators? Is that even possible with strict servers where the requests are already decoded before reaching to the handler.
It would be great if folks could share some ideas or references on how they are writing validations with oapi-codegen. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m new to
oapi-codegen
, but I’m familiar with code generation tools and the idea of generating types, server and client boilerplate code coming from thegRPC
/Proto
ecosystem. That’s why I really like this tool.Right now, I’m trying to figure out how to implement validation logic, does
oapi-codegen
support this directly, or would I need to create middleware of type strictnethttp.StrictHTTPMiddlewareFunc
?Also, is it possible to apply validations using
JSON Schema
rules (e.g., pattern, format, length, etc.) rather than creating validators? Is that even possible with strict servers where the requests are already decoded before reaching to the handler.It would be great if folks could share some ideas or references on how they are writing validations with
oapi-codegen
. Thanks!Beta Was this translation helpful? Give feedback.
All reactions