RicoSuter/NJsonSchema

Integers without formats don't generate default negative values in code

Open

#1,420 建立於 2021年10月6日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)C# (550 fork)github user discovery
help wantedtype: enhancement

倉庫指標

Star
 (1,578 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Given the following YAML spec:

exampleproperty:
  type: integer
  default: -1

The default value is missing in code/controller generation unless an explicit format is given as such:

exampleproperty:
  type: integer
  format: int32
  default: -1

貢獻者指南