Open r-pankevicius opened 7 years ago
Same for the ARM json schema from #298: after temporarily modified the code to workaround an issue in the json schema bug, it loaded all the linked json schemas in 15 seconds without exception (as it appears), but the generated code is empty.
I'm not so sure it's JSON pointer issue as in #298 . I see all references have / after # in this file, e.g. "$ref": "#/definitions/response". I tried to invoke Validate on schema:
JsonSchema4 jsonSchema = await JsonSchema4.FromUrlAsync(schemaUrl);
string json = jsonSchema.ToJson();
var errors = jsonSchema.Validate(json).ToArray();
if (errors.Length > 0)
{
Console.WriteLine($"Hey, we got {errors.Length} errors in schema!");
for (int i = 0; i < errors.Length; i++)
{
Console.WriteLine($"=== Error {i+1}:");
Console.WriteLine(errors[i]);
}
}
I got 1 error that I don't know how to interpret:
NotAnyOf: #/
{
NotAllOf: #/
{
NotAllOf: #/
{
PropertyRequired: #/type
PropertyRequired: #/features
}
{
PropertyRequired: #/type
}
}
{
}
}
{
ArrayExpected: #/
}
{
ArrayExpected: #/
}
{
ArrayExpected: #/
}
{
PropertyRequired: #/code
PropertyRequired: #/reason
PropertyRequired: #/errors
}
Hi, I'm trying to generate serialization classes for this draft-04 schema, url is http://namespace.lantmateriet.se/distribution/produkter/registerbeteckning/v4/registerbeteckning-4.0.0.json.
Generator generates a single class without any attributes. Generator code:
Is there something wrong with this JSON schema or generator doesn't support some features?