Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "required" property is not supported ? #24

Open
StefH opened this issue Jun 16, 2015 · 1 comment
Open

The "required" property is not supported ? #24

StefH opened this issue Jun 16, 2015 · 1 comment

Comments

@StefH
Copy link
Contributor

StefH commented Jun 16, 2015

When using this Basic example schema on : http://json-schema.org/examples.html

{
    "title": "Example Schema",
    "type": "object",
    "properties": {
        "firstName": {
            "type": "string"
        },
        "lastName": {
            "type": "string"
        },
        "age": {
            "description": "Age in years",
            "type": "integer",
            "minimum": 0
        }
    },
    "required": ["firstName", "lastName"]
}

The software generates this error:

2015-06-16 21:19:15.1404 [Error] Could not parse the schema: file:///c:/temp/jschema.json
Make sure your schema is compatible.Examine the stack trace below.
2015-06-16 21:19:15.1603 [Fatal] System.ArgumentException: Can not convert Array to Boolean.
   at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
   at Newtonsoft.Json.Schema.JsonSchemaBuilder.ProcessSchemaProperties(JObject schemaObject)
   at Newtonsoft.Json.Schema.JsonSchemaBuilder.BuildSchema(JToken token)
   at Newtonsoft.Json.Schema.JsonSchemaBuilder.Read(JsonReader reader)
   at Newtonsoft.Json.Schema.JsonSchema.Read(JsonReader reader, JsonSchemaResolver resolver)
   at Newtonsoft.Json.Schema.JsonSchema.Parse(String json, JsonSchemaResolver resolver)
   at Cvent.SchemaToPoco.Core.JsonSchemaResolver.ResolveSchemaHelper(Uri curr, Uri parent, String data) in C:\Users\Stef\Documents\Github\forks\json-schema-2-poco
@StefH
Copy link
Contributor Author

StefH commented Jun 17, 2015

Probably related to JamesNK/Newtonsoft.Json#115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant