massively improves the jspg validator by removing mathmatical functions like allOf, anyOf, ref, etc to effectively use discriminators and OOP with types to determine valid pathing an nno intersections, unions, or guesswork; added cases to replace the former conditionals
This commit is contained in:
@ -165,7 +165,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "organization",
|
||||
"$ref": "entity",
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
@ -213,7 +213,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "user",
|
||||
"$ref": "organization",
|
||||
"type": "organization",
|
||||
"properties": {}
|
||||
}
|
||||
],
|
||||
@ -262,7 +262,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "person",
|
||||
"$ref": "user",
|
||||
"type": "user",
|
||||
"properties": {
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
@ -282,15 +282,15 @@
|
||||
"contacts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "contact",
|
||||
"type": "contact",
|
||||
"properties": {
|
||||
"target": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "phone_number"
|
||||
"type": "phone_number"
|
||||
},
|
||||
{
|
||||
"$ref": "email_address"
|
||||
"type": "email_address"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -300,10 +300,10 @@
|
||||
"email_addresses": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "contact",
|
||||
"type": "contact",
|
||||
"properties": {
|
||||
"target": {
|
||||
"$ref": "email_address"
|
||||
"type": "email_address"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -376,7 +376,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "order",
|
||||
"$ref": "entity",
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "number"
|
||||
@ -385,12 +385,12 @@
|
||||
"type": "string"
|
||||
},
|
||||
"customer": {
|
||||
"$ref": "person"
|
||||
"type": "person"
|
||||
},
|
||||
"lines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "order_line"
|
||||
"type": "order_line"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -440,7 +440,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "order_line",
|
||||
"$ref": "entity",
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"order_id": {
|
||||
"type": "string"
|
||||
@ -549,7 +549,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "relationship",
|
||||
"$ref": "entity",
|
||||
"type": "entity",
|
||||
"properties": {}
|
||||
}
|
||||
],
|
||||
@ -619,7 +619,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "contact",
|
||||
"$ref": "relationship",
|
||||
"type": "relationship",
|
||||
"properties": {
|
||||
"is_primary": {
|
||||
"type": "boolean"
|
||||
@ -677,7 +677,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "phone_number",
|
||||
"$ref": "entity",
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"number": {
|
||||
"type": "string"
|
||||
@ -736,7 +736,7 @@
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "email_address",
|
||||
"$ref": "entity",
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"address": {
|
||||
"type": "string"
|
||||
@ -772,7 +772,7 @@
|
||||
},
|
||||
{
|
||||
"$id": "attachment",
|
||||
"$ref": "entity",
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"flags": {
|
||||
"type": "array",
|
||||
@ -781,10 +781,10 @@
|
||||
}
|
||||
},
|
||||
"type_metadata": {
|
||||
"$ref": "type_metadata"
|
||||
"type": "type_metadata"
|
||||
},
|
||||
"other_metadata": {
|
||||
"$ref": "other_metadata"
|
||||
"type": "other_metadata"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user