jsonschema:从Go类型生成JSON模式

时间:2021-04-30 01:51:06
【文件属性】:
文件名称:jsonschema:从Go类型生成JSON模式
文件大小:25KB
文件格式:ZIP
更新时间:2021-04-30 01:51:06
Go 进行JSON模式反射 该包可用于通过反射从Go类型生成。 支持任意复杂的类型,包括interface{} ,地图,切片等。 支持json模式的功能,例如minLength,maxLength,pattern,format等。 支持简单的字符串和数字枚举。 通过jsonschema_extras struct标记支持自定义属性字段。 例子 以下Go类型: type TestUser struct { ID int `json:"id"` Name string `json:"name" jsonschema:"title=the name,description=The name of a friend,example=joe,example=lucy,defau
【文件预览】:
jsonschema-master
----go.mod(197B)
----.github()
--------FUNDING.yml(21B)
----go.sum(907B)
----COPYING(1KB)
----fixtures()
--------yaml_inline_embed.json(327B)
--------custom_additional.json(473B)
--------schema_with_minimum.json(397B)
--------no_ref_qual_types.json(6KB)
--------required_from_jsontags.json(3KB)
--------nullable.json(452B)
--------oneof.json(2KB)
--------allow_additional_props.json(3KB)
--------disable_inlining_embedded.json(609B)
--------test_yaml_and_json_prefer_yaml.json(541B)
--------defaults.json(3KB)
--------custom_type.json(390B)
--------defaults_expanded_toplevel.json(3KB)
--------no_reference.json(6KB)
--------fully_qualified.json(4KB)
--------yaml_inline.json(622B)
--------test_yaml_and_json.json(538B)
--------ignore_type.json(3KB)
----reflect_test.go(7KB)
----.travis.yml(68B)
----README.md(7KB)
----reflect.go(21KB)

网友评论