go-jsonschema icon indicating copy to clipboard operation
go-jsonschema copied to clipboard

Problems generating structs from schema.

Open ilijamt opened this issue 1 year ago • 1 comments

I'm trying to generate the structs from https://unpkg.com/@atlaskit/[email protected]/dist/json-schema/v1/full.json

But I'm greeted with the following error:

go-jsonschema: Failed: error parsing from file ./schema.json: cannot load schema
error parsing JSON file schema.json: failed to unmarshal JSON: failed to unmarshal schema: failed to unmarshal type: failed to unmarshal type: failed to unmarshal type: failed to unmarshal type: json: cannot unmarshal array into Go value of type schemas.ObjectAsType

go-jsonschema: v0.15.0

ilijamt avatar Feb 06 '24 14:02 ilijamt

~~Having the same issue~~

Found the problem, I had an array of strings in my schema and somehow that triggered the error. In any case, the error message could be a bit clearer :)

survivorbat avatar May 30 '24 21:05 survivorbat