Skip to content

Commit

Permalink
Use omissis/go-jsonschema image for type gen
Browse files Browse the repository at this point in the history
Generate types from the JSON schema using the `omissis/go-jsonschema`
image instead of the `surjection/go-jsonschema` image.

We used the `surjection/go-jsonschema` image because we needed a
feature that was not yet released in the `omissis/go-jsonschema` image:

omissis/go-jsonschema#220

Now that the feature is available in the `omissis/go-jsonschema` `0.17`
release we can switch back to using it.
  • Loading branch information
andrew-farries committed Dec 17, 2024
1 parent 52d3c95 commit da46a45
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ format:

generate: format
# Generate the types from the JSON schema
# Temporarily use the `surjection/go-jsonschema` image because we need https://github.com/omissis/go-jsonschema/pull/220
# Use the official `omissis/gojsonschema` image once 0.17.0 is released.
docker run --rm -v $$PWD/schema.json:/mnt/schema.json surjection/go-jsonschema:0.16.1 --only-models -p migrations --tags json /mnt/schema.json > pkg/migrations/types.go
docker run --rm -v $$PWD/schema.json:/mnt/schema.json omissis/go-jsonschema:0.17.0 --only-models -p migrations --tags json /mnt/schema.json > pkg/migrations/types.go

# Add the license header
echo "// SPDX-License-Identifier: Apache-2.0" | cat - pkg/migrations/types.go > pkg/migrations/types.go.tmp
Expand Down

0 comments on commit da46a45

Please sign in to comment.