mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-24 11:00:02 +02:00
[CHORE] Update jsonschema library to v6
- Update the `github.com/santhosh-tekuri/jsonschema` library from v5 to v6. - Update the migration loader function to a type, which is now required in V6. - `github.com/santhosh-tekuri/jsonschema/v6` was already used by gof3, so removing the v5 library and using the v6 library reduces the binary size of Forgejo. - Before: 95912040 bytes - After: 95706152 bytes
This commit is contained in:
parent
6e83c39f13
commit
45401e044f
8 changed files with 29 additions and 20 deletions
|
@ -56,7 +56,7 @@ import (
|
|||
"github.com/markbates/goth/gothic"
|
||||
goth_github "github.com/markbates/goth/providers/github"
|
||||
goth_gitlab "github.com/markbates/goth/providers/gitlab"
|
||||
"github.com/santhosh-tekuri/jsonschema/v5"
|
||||
"github.com/santhosh-tekuri/jsonschema/v6"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@ -659,7 +659,7 @@ func VerifyJSONSchema(t testing.TB, resp *httptest.ResponseRecorder, schemaFile
|
|||
_, schemaFileErr := os.Stat(schemaFilePath)
|
||||
assert.Nil(t, schemaFileErr)
|
||||
|
||||
schema, err := jsonschema.Compile(schemaFilePath)
|
||||
schema, err := jsonschema.NewCompiler().Compile(schemaFilePath)
|
||||
assert.NoError(t, err)
|
||||
|
||||
var data any
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue