mirror of
https://github.com/xataio/pgroll.git
synced 2024-09-11 05:45:48 +03:00
Format schema.json
on generate (#294)
Add rule to format JSON Schema with prettier --------- Signed-off-by: Alexis Rico <sferadev@gmail.com>
This commit is contained in:
parent
c08ef7065c
commit
52fb532e63
4
Makefile
4
Makefile
@ -1,5 +1,9 @@
|
||||
.PHONY: generate
|
||||
generate:
|
||||
# Format JSON schema
|
||||
docker run --rm -v $$PWD/schema.json:/mnt/schema.json node:alpine npx prettier /mnt/schema.json --parser json --tab-width 2 --single-quote --trailing-comma all --no-semi --arrow-parens always --print-width 120 > schema.json.tmp
|
||||
mv schema.json.tmp schema.json
|
||||
|
||||
# Generate the types from the JSON schema
|
||||
docker run --rm -v $$PWD/schema.json:/mnt/schema.json omissis/go-jsonschema:0.14.1 --only-models -p migrations --tags json /mnt/schema.json > pkg/migrations/types.go
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user