https://github.com/ysmood/jschema
A lib to convert existing golang struct into json schema list.
https://github.com/ysmood/jschema
Last synced: 8 months ago
JSON representation
A lib to convert existing golang struct into json schema list.
- Host: GitHub
- URL: https://github.com/ysmood/jschema
- Owner: ysmood
- License: mit
- Created: 2023-10-24T19:25:21.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-22T04:01:50.000Z (12 months ago)
- Last Synced: 2025-01-22T05:18:03.146Z (12 months ago)
- Language: Go
- Size: 70.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
A lib to convert existing golang structs into json schema list.
Features:
- No need to modify the existing structs
- Support `anyOf` for interface typing
- Support custom type hijack
- Support easy modification of the generated schema
- Support enum [](https://github.com/ent/ent/blob/a792f429a659bf74debdabea1b27856daeb47d22/schema/field/field.go#L920-L923) type
## Usage
Read [example](examples_test.go) for more details.