Skip to content

Commit

Permalink
fix: fix schema syntax and naming (#1217)
Browse files Browse the repository at this point in the history
* fix: fix schema syntax and naming

* fix: remove extra schema:version option for the cataloged $def

* fix: remove entry as a global property

* fix: remove "schema" from the cataloged refs

* fix: remove null type option and add default for enum

* feat: update routes titles and type

* fix: update types and defaults

* fix: add schema back to test catalog

* feat: update tcp and tls object inheritance to add object type and title

* fix: disable etry and catalog at global level

* fix: remove catalog object

* fix: multiple options of object not necessary

* feat: add catalog title

* fix: move global catalog def to the binding

* fix: update test to reflect not allowing null ALPN

* add grpc options back

* add global entry back

* add defaults to the schema

* Update specs/binding-http.spec/src/main/scripts/io/aklivity/zilla/specs/binding/http/schema/http.schema.patch.json

Co-authored-by: John Fallows <john@aklivity.io>

* revert options titles to remove context

* remove mutual default

* move entry back

* Revert "fix: move global catalog def to the binding"

This reverts commit 4ec3456.

* fix removed properties

* use title Authorization

* fix bad rebase

* remove null option

* remove added entry section

---------

Co-authored-by: John Fallows <john@aklivity.io>
  • Loading branch information
vordimous and jfallows authored Sep 13, 2024
1 parent 949cfca commit 9d5d4b3
Show file tree
Hide file tree
Showing 36 changed files with 217 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,25 @@
{
"enum": [ "server" ]
},
"catalog": false,
"vault": false,
"options": false,
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"additionalProperties": false,
"properties":
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "client", "server" ]
},
"catalog": false,
"vault": false,
"options": false,
"routes": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ else if (key.equals("type") && isPrimitiveType(value))
else if (jsonObject.containsKey("type") &&
isPrimitiveType(jsonObject.get("type")))
{
if (key.equals("title") || key.equals("description"))
if (key.equals("title") || key.equals("description") || key.equals("default"))
{
builder.add(key, value);
}
Expand Down Expand Up @@ -137,7 +137,7 @@ private JsonArray createAnyOfTypes(

properties.forEach((key, value) ->
{
if (!"title".equals(key) && !"description".equals(key))
if (!"title".equals(key) && !"description".equals(key) && !"default".equals(key))
{
objectBuilder.add(key, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "server", "client", "proxy" ]
},
"catalog": false,
"options":
{
"properties":
Expand Down Expand Up @@ -78,6 +79,7 @@
},
"catalog":
{
"title": "Catalog",
"type": "object",
"patternProperties":
{
Expand Down Expand Up @@ -201,14 +203,20 @@
},
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"additionalProperties": false,
"properties":
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "server" ]
},
"catalog": false,
"vault": false,
"options": false,
"routes": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "server" ]
},
"catalog": false,
"vault": false,
"options": false,
"routes": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "server" ]
},
"catalog": false,
"vault": false,
"options":
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "proxy" ]
},
"catalog": false,
"vault": false,
"options":
{
Expand Down Expand Up @@ -123,14 +124,20 @@
},
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"method":
Expand Down Expand Up @@ -192,6 +199,7 @@
"type": "array",
"items":
{
"type": "object",
"properties":
{
"key":
Expand Down Expand Up @@ -233,7 +241,8 @@
{
"title": "Acks",
"type": "string",
"enum": [ "none", "leader_only", "in_sync_replicas" ]
"enum": [ "none", "leader_only", "in_sync_replicas" ],
"default": "in_sync_replicas"
},
"key":
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,20 @@
"vault": false,
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"method":
Expand Down Expand Up @@ -134,6 +140,7 @@
{
"const": "client"
},
"catalog": false,
"options": false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,25 @@
{
"enum": [ "proxy" ]
},
"catalog": false,
"vault": false,
"options": false,
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"path":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "proxy" ]
},
"catalog": false,
"vault": false,
"options":
{
Expand Down Expand Up @@ -94,14 +95,20 @@
},
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"method":
Expand Down Expand Up @@ -143,6 +150,7 @@
"type": "array",
"items":
{
"type": "object",
"properties":
{
"key":
Expand Down Expand Up @@ -228,7 +236,8 @@
{
"title": "Acks",
"type": "string",
"enum": [ "none", "leader_only", "in_sync_replicas" ]
"enum": [ "none", "leader_only", "in_sync_replicas" ],
"default": "in_sync_replicas"
},
"key":
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "server", "client" ]
},
"catalog": false,
"vault": false,
"options":
{
Expand All @@ -57,7 +58,9 @@
"policy":
{
"title": "Policy",
"type": "string"
"type": "string",
"enum": [ "same-origin" , "cross-origin" ],
"default": "same-origin"
}
},
"oneOf":
Expand Down Expand Up @@ -346,14 +349,20 @@
},
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"headers":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{
"enum": [ "remote_server" ]
},
"catalog": false,
"vault": false,
"options":
{
Expand All @@ -44,7 +45,8 @@
"none",
"leader_only",
"in_sync_replicas"
]
],
"default": "in_sync_replicas"
},
"idempotency":
{
Expand Down Expand Up @@ -106,14 +108,20 @@
},
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"topic":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,24 @@
{
"enum": [ "cache_client", "cache_server", "client" ]
},
"catalog": false,
"vault": false,
"routes":
{
"title": "Routes",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"when":
{
"title": "When",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"topic":
Expand Down Expand Up @@ -380,7 +387,7 @@
}
}
}
],
]
},
{
"minItems": 1,
Expand Down
Loading

0 comments on commit 9d5d4b3

Please sign in to comment.