Skip to content

Commit

Permalink
bump code
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Oct 6, 2023
1 parent dc902c3 commit 6ff050b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
)

// https://github.com/invopop/jsonschema/pull/106
replace github.com/invopop/jsonschema => github.com/cloudquery/jsonschema v0.0.0-20231004102900-26eed64ef87a
replace github.com/invopop/jsonschema => github.com/cloudquery/jsonschema v0.0.0-20231006094144-b42fc04b92bb

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPn
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/cloudquery/jsonschema v0.0.0-20231004102900-26eed64ef87a h1:nMaPG7Hlvt5c90scdRoyUpOhkkgkP8v+nlq3bBuWi4E=
github.com/cloudquery/jsonschema v0.0.0-20231004102900-26eed64ef87a/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0=
github.com/cloudquery/jsonschema v0.0.0-20231006094144-b42fc04b92bb h1:W3y1G8XTh5NrFloojJqv8oFfAPbzdWlt5i0ik3rU2Pk=
github.com/cloudquery/jsonschema v0.0.0-20231006094144-b42fc04b92bb/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0=
github.com/cloudquery/plugin-sdk/v4 v4.12.3 h1:Gp7FtVhdh+5Ypv81r+j7Ph/2WyNje/4cv3+KraY0SQI=
github.com/cloudquery/plugin-sdk/v4 v4.12.3/go.mod h1:62pXdBEQQB/M13G0Jp6lDNtmgbnuzPy38LoDgVPx0ns=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
Expand Down
4 changes: 2 additions & 2 deletions jsonschema/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func Example_basicSchema() {
// {
// "$schema": "https://json-schema.org/draft/2020-12/schema",
// "$id": "https://github.com/cloudquery/codegen/jsonschema_test/basic",
// "$ref": "#/$defs/github.com~1cloudquery~1codegen~1jsonschema_test~1basic",
// "$ref": "#/$defs/basic",
// "$defs": {
// "github.com/cloudquery/codegen/jsonschema_test/basic": {
// "basic": {
// "properties": {
// "a": {
// "type": "string",
Expand Down
2 changes: 1 addition & 1 deletion jsonschema/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// Generate returns a formatted JSON schema for the input struct, according to the tags
// defined by https://github.com/invopop/jsonschema
func Generate(a any) ([]byte, error) {
sc := (&jsonschema.Reflector{RequiredFromJSONSchemaTags: true, NamesWithPkg: true}).Reflect(a)
sc := (&jsonschema.Reflector{RequiredFromJSONSchemaTags: true, NullableFromType: true}).Reflect(a)
if err := Sanitize(sc); err != nil {
return nil, err
}
Expand Down

0 comments on commit 6ff050b

Please sign in to comment.