From 4588961d99621a39644b999fb08edcbb9dd4dee0 Mon Sep 17 00:00:00 2001 From: Leonardo Taglialegne Date: Tue, 3 Feb 2026 13:37:00 +0100 Subject: [PATCH] `password` string format --- src/OpenApi/Config.elm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/OpenApi/Config.elm b/src/OpenApi/Config.elm index 8bde4c9..fba0d8f 100644 --- a/src/OpenApi/Config.elm +++ b/src/OpenApi/Config.elm @@ -268,6 +268,7 @@ defaultFormats = , uriFormat , uuidFormat , byteFormat + , passwordFormat ] @@ -435,6 +436,21 @@ byteFormat = } +passwordFormat : Format +passwordFormat = + { basicType = Common.String + , format = "password" + , annotation = Elm.Annotation.string + , encode = Gen.Json.Encode.call_.string + , decoder = + Gen.Json.Decode.string + , toParamString = identity + , sharedDeclarations = [] + , requiresPackages = [] + , example = Json.Encode.string "hunter2" + } + + ------------- -- Setters --