https://github.com/trinnguyen/jsonsc
A DSL to define JSON schema
https://github.com/trinnguyen/jsonsc
dsl json-schema swift
Last synced: about 2 months ago
JSON representation
A DSL to define JSON schema
- Host: GitHub
- URL: https://github.com/trinnguyen/jsonsc
- Owner: trinnguyen
- License: mit
- Created: 2022-03-25T03:43:41.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-03T11:07:14.000Z (about 4 years ago)
- Last Synced: 2026-03-29T07:58:03.540Z (3 months ago)
- Topics: dsl, json-schema, swift
- Language: Swift
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonsc
A DSL to define JSON schema
## Getting started
### Sample input
File `hello.jsons`
```ruby
type Foo {
name: string,
count: int,
price: decimal,
is_active: bool
}
type Bar {
foo: Foo
}
```
### Run command-line tool
```shell
OVERVIEW: A DSL to define JSON schema
USAGE: jsonsc [--verbose]
ARGUMENTS:
Path to .jsons file
OPTIONS:
--verbose Enable verbose logging
-h, --help Show help information.
```
- Execute: `jsonsc hello.jsons`
## Build
- Build debug `swift build`
- Run debug: `swift run`
- Run tests: `swift tests`
- Build release: `swift build -c release`