From da46a457f0c41887019512daaeeb2b7da88f319f Mon Sep 17 00:00:00 2001 From: Andrew Farries Date: Tue, 17 Dec 2024 16:22:38 +0000 Subject: [PATCH] Use `omissis/go-jsonschema` image for type gen 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: https://github.com/omissis/go-jsonschema/pull/220 Now that the feature is available in the `omissis/go-jsonschema` `0.17` release we can switch back to using it. --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5f53070f..7d4a8e91 100644 --- a/Makefile +++ b/Makefile @@ -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