RicoSuter/NJsonSchema

Support of const keyword

Open

#1,329 opened on Feb 26, 2021

View on GitHub
 (4 comments) (4 reactions) (2 assignees)C# (550 forks)github user discovery
help wantedtype: enhancement

Repository metrics

Stars
 (1,578 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I'm not a Json schema deep diver, but somehow I miss support for the const keyword (at least for C# code generation):

{ "title": "Person", "type": "object", "properties": { "cmdType": { "$comment": "This results in a string template literal when generating TS", "const": "person" }, ... }

Contributor guide