Open wstaelens opened 6 years ago
What is new/missing?
I was looking for writeOnly
support when I found this issue. I wonder if [DataType(DataType.Password)]
would somewhat fit the spec for that one?
It’s probably a bit too specific and probably better if you implement an own schema processor which handles that according to your needs.
When you say "it's probably too specific" do you mean "writeOnly" or "password"? If I understand the spec correctly, "writeOnly" is part of the latest draft (haven't checked earlier versions but according to this issue it seems to be part of v7 too). If you mean "password", I don't really need it; I just wanted to bring it to your attention (it is part of System.ComponentModel.DataAnnotations
). If you have plans for implementing "writeOnly" that would be cool. If it does not take a huge effort to get familiar with the repo, I might as well give it a go myself. Pointers would be appreciated.
I think supporting the property in the model as bool? is fine but generating password as always writeOnly is a breaking change and might not be correct for everyone. A PR for the property is appreciated.
(+ update: http://json-schema.org/implementations.html#validator-dotnet ;-) )
Tasks v6:
Tasks v7: