-
Notifications
You must be signed in to change notification settings - Fork 44
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
Expected object or boolean as schema, got string #13
Comments
Can you try this again? We've made some improvements. |
I'm having the same issue on Linux. Lib version 0.4.0. {
"$schema": "https://json-schema.org/draft-04/schema",
"definitions": {
"address": {
"type": "object",
"properties": {
"street_address": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
}
},
"required": [
"street_address",
"city",
"state"
]
}
},
"links": [
{
"rel": "self",
"href": ""
},
{
"rel": "about",
"href": "/docs",
"targetSchema": {
"$ref": "/author/schema"
}
}
],
"$id": "hello",
"type": "object",
"required": ["dependenciesProp"],
"properties": {
"dependenciesProp": {
"type": "object",
"properties": {
"a": {
"type": "string"
}
},
"dependencies": {
"one": ["emailFormat"]
}
},
"exclusiveMaximumProp": {
"type": "number",
"maximum": 99,
"minimum": 1,
"exclusiveMaximum": true,
"exclusiveMinimum": true
},
"emailFormat": {
"type": "string",
"format": "email"
},
"hostnameFormat": {
"type": "string",
"format": "hostname"
},
"ipv4Format": {
"type": "string",
"format": "ipv4"
},
"ipv6Format": {
"type": "string",
"format": "ipv6"
},
"uriFormat": {
"type": "string",
"format": "uri"
},
"allOfProp": {
"allOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"oneOfProp": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"notProp": {
"not": {
"type": "string"
}
},
"itemsArray": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"containsProp": {
"type": "array",
"contains": {
"type": "number"
}
},
"readOnlyProp": {
"type": "number",
"readOnly": true
},
"writeOnlyProp": {
"type": "number",
"writeOnly": true
},
"additionalItemsProp": {
"type": "array",
"additionalItems": false
},
"propertyNamesProp": {
"type": "object",
"propertyNames": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
}
},
"patternPropertiesProp": {
"type": "object",
"^S_": {
"type": "string"
},
"^I_": {
"type": "integer"
}
},
"mediaProp": {
"type": "string",
"media": "text/html"
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wanted to convert the JSON schema here, but I get an error message:
The text was updated successfully, but these errors were encountered: