refactor: Use public write API and point-free style in validate
commitd790ae472d4bc739a4162936c144a2ed7d34d2bd
authorMark <mark.eibes@gmail.com>
dateSun 8 Feb 2026, 00:50 (8 months ago)
parente7e74eb
test/Test/OpenAPIValidation.purs+3−2
@@ -1,10 +1,11 @@
11module Test.OpenAPIValidation (validate) where
22
3+import Prelude
34import Foreign (Foreign)
45import Yoga.HTTP.API.Route.OpenAPI (OpenAPISpec)
5−import Yoga.JSON (writeImpl)
6+import Yoga.JSON (write)
67
78foreign import validateImpl :: Foreign -> { errors :: Array { message :: String } }
89
910validate :: OpenAPISpec -> { errors :: Array { message :: String } }
10−validate spec = validateImpl (writeImpl spec)
11+validate = validateImpl <<< write