Skip to content

Commit

Permalink
use gdbots/schemas v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbrown committed Jun 17, 2020
1 parent 03d6b6f commit 70719ab
Show file tree
Hide file tree
Showing 11 changed files with 500 additions and 4 deletions.
1 change: 1 addition & 0 deletions build/js/src/manifests/gdbots/common/mixin/taggable/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default [
'gdbots:ncr:command:rename-node:v1',
'gdbots:ncr:command:unlock-node:v1',
'gdbots:ncr:command:unpublish-node:v1',
'gdbots:ncr:command:update-node:v1',
'gdbots:ncr:event:edge-created:v1',
'gdbots:ncr:event:edge-deleted:v1',
'gdbots:ncr:event:node-created:v1',
Expand Down
1 change: 1 addition & 0 deletions build/js/src/manifests/gdbots/pbjx/mixin/command/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ export default [
'gdbots:ncr:command:rename-node:v1',
'gdbots:ncr:command:unlock-node:v1',
'gdbots:ncr:command:unpublish-node:v1',
'gdbots:ncr:command:update-node:v1',
'gdbots:pbjx:command:check-health:v1',
];
1 change: 1 addition & 0 deletions build/js/src/manifests/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default {
'gdbots:ncr:command:rename-node:v1': import('@gdbots/schemas/gdbots/ncr/command/RenameNodeV1'),
'gdbots:ncr:command:unlock-node:v1': import('@gdbots/schemas/gdbots/ncr/command/UnlockNodeV1'),
'gdbots:ncr:command:unpublish-node:v1': import('@gdbots/schemas/gdbots/ncr/command/UnpublishNodeV1'),
'gdbots:ncr:command:update-node:v1': import('@gdbots/schemas/gdbots/ncr/command/UpdateNodeV1'),
'gdbots:ncr:event:edge-created:v1': import('@gdbots/schemas/gdbots/ncr/event/EdgeCreatedV1'),
'gdbots:ncr:event:edge-deleted:v1': import('@gdbots/schemas/gdbots/ncr/event/EdgeDeletedV1'),
'gdbots:ncr:event:node-created:v1': import('@gdbots/schemas/gdbots/ncr/event/NodeCreatedV1'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'gdbots:ncr:command:rename-node:v1',
'gdbots:ncr:command:unlock-node:v1',
'gdbots:ncr:command:unpublish-node:v1',
'gdbots:ncr:command:update-node:v1',
'gdbots:ncr:event:edge-created:v1',
'gdbots:ncr:event:edge-deleted:v1',
'gdbots:ncr:event:node-created:v1',
Expand Down
1 change: 1 addition & 0 deletions build/php/src/manifests/gdbots/pbjx/mixin/command/v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
'gdbots:ncr:command:rename-node:v1',
'gdbots:ncr:command:unlock-node:v1',
'gdbots:ncr:command:unpublish-node:v1',
'gdbots:ncr:command:update-node:v1',
'gdbots:pbjx:command:check-health:v1',
];
1 change: 1 addition & 0 deletions build/php/src/manifests/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
'gdbots:ncr:command:rename-node:v1' => 'Gdbots\Schemas\Ncr\Command\RenameNodeV1',
'gdbots:ncr:command:unlock-node:v1' => 'Gdbots\Schemas\Ncr\Command\UnlockNodeV1',
'gdbots:ncr:command:unpublish-node:v1' => 'Gdbots\Schemas\Ncr\Command\UnpublishNodeV1',
'gdbots:ncr:command:update-node:v1' => 'Gdbots\Schemas\Ncr\Command\UpdateNodeV1',
'gdbots:ncr:event:edge-created:v1' => 'Gdbots\Schemas\Ncr\Event\EdgeCreatedV1',
'gdbots:ncr:event:edge-deleted:v1' => 'Gdbots\Schemas\Ncr\Event\EdgeDeletedV1',
'gdbots:ncr:event:node-created:v1' => 'Gdbots\Schemas\Ncr\Event\NodeCreatedV1',
Expand Down
1 change: 1 addition & 0 deletions gh-pages/json-schema/gdbots/ncr/command/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ <h1>Gdbots Acme Schemas</h1>
<a href="rename-node/">rename-node/</a>
<a href="unlock-node/">unlock-node/</a>
<a href="unpublish-node/">unpublish-node/</a>
<a href="update-node/">update-node/</a>
</pre>
</body>
</html>
239 changes: 239 additions & 0 deletions gh-pages/json-schema/gdbots/ncr/command/update-node/1-0-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
{
"id": "http://acme-schemas.gdbots.io/json-schema/gdbots/ncr/command/update-node/1-0-0.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_schema": {
"type": "string",
"pattern": "^pbj:([a-z0-9-]+):([a-z0-9\\.-]+):([a-z0-9-]+)?:([a-z0-9-]+):([0-9]+-[0-9]+-[0-9]+)$",
"default": "pbj:gdbots:ncr:command:update-node:1-0-0"
},
"command_id": {
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"occurred_at": {
"type": "string",
"pattern": "^[1-9]{1}[0-9]{12,15}$"
},
"expected_etag": {
"type": "string",
"pattern": "^[\\w\\.:-]+$",
"description": "Used to perform optimistic concurrency control. @link https://en.wikipedia.org/wiki/HTTP_ETag"
},
"ctx_tenant_id": {
"type": "string",
"pattern": "^[\\w\\/\\.:-]+$",
"description": "Multi-tenant apps can use this field to track the tenant id."
},
"ctx_retries": {
"type": "integer",
"default": 0,
"minimum": 0,
"maximum": 255,
"description": "The \"ctx_retries\" field is used to keep track of how many attempts were made to process this command. In some cases, the service or transport that handles the command may be down or an optimistic check has failed and is being retried."
},
"ctx_causator": {
"type": "object",
"description": "The \"ctx_causator\" is the actual causator object that \"ctx_causator_ref\" refers to. In some cases it's useful for command handlers to copy the causator into the command. For example, when a node is being updated we may want to know what the node will be after the update. We can derive this via the causator instead of requesting the node and engaging a race condition."
},
"ctx_causator_ref": {
"type": "object",
"properties": {
"curie": {
"type": "string",
"pattern": "^([a-z0-9-]+):([a-z0-9\\.-]+):([a-z0-9-]+)?:([a-z0-9-]+)$",
"minLength": 0,
"maxLength": 146
},
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9:_\\-]+$",
"minLength": 0,
"maxLength": 255
},
"tag": {
"type": "string",
"pattern": "^([\\w\\/-]|[\\w-][\\w\\/-]*[\\w-])$",
"minLength": 0,
"maxLength": 255
}
},
"required": [
"curie",
"id"
],
"additionalProperties": false
},
"ctx_correlator_ref": {
"type": "object",
"properties": {
"curie": {
"type": "string",
"pattern": "^([a-z0-9-]+):([a-z0-9\\.-]+):([a-z0-9-]+)?:([a-z0-9-]+)$",
"minLength": 0,
"maxLength": 146
},
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9:_\\-]+$",
"minLength": 0,
"maxLength": 255
},
"tag": {
"type": "string",
"pattern": "^([\\w\\/-]|[\\w-][\\w\\/-]*[\\w-])$",
"minLength": 0,
"maxLength": 255
}
},
"required": [
"curie",
"id"
],
"additionalProperties": false
},
"ctx_user_ref": {
"type": "object",
"properties": {
"curie": {
"type": "string",
"pattern": "^([a-z0-9-]+):([a-z0-9\\.-]+):([a-z0-9-]+)?:([a-z0-9-]+)$",
"minLength": 0,
"maxLength": 146
},
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9:_\\-]+$",
"minLength": 0,
"maxLength": 255
},
"tag": {
"type": "string",
"pattern": "^([\\w\\/-]|[\\w-][\\w\\/-]*[\\w-])$",
"minLength": 0,
"maxLength": 255
}
},
"required": [
"curie",
"id"
],
"additionalProperties": false
},
"ctx_app": {
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/app"
}
],
"description": "The \"ctx_app\" refers to the application used to send the command. This is different from ctx_ua (user_agent) because the agent used (Safari, Firefox) is not necessarily the app used (cms, iOS app, website)"
},
"ctx_cloud": {
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/cloud"
}
],
"description": "The \"ctx_cloud\" is set by the server receiving the command and is generally only used internally for tracking and performance monitoring."
},
"ctx_ip": {
"type": "string",
"format": "ipv4"
},
"ctx_ipv6": {
"type": "string",
"format": "ipv6"
},
"ctx_ua": {
"type": "string",
"minLength": 0,
"maxLength": 65535
},
"ctx_msg": {
"type": "string",
"minLength": 0,
"maxLength": 65535,
"description": "An optional message/reason for the command being sent. Consider this like a git commit message."
},
"tags": {
"type": "object",
"patternProperties": {
"^[a-zA-Z_]{1}[\\w\\.:-]+$": {
"type": "string",
"pattern": "^[\\w\\/\\.:-]+$"
}
},
"additionalProperties": false,
"description": "Tags is a map that categorizes data or tracks references in external systems. The tags names should be consistent and descriptive, e.g. fb_user_id:123, salesforce_customer_id:456."
},
"node_ref": {
"type": "string",
"pattern": "^[\\w\\/\\.:-]+$"
},
"new_node": {
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/node"
}
]
},
"old_node": {
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/node"
}
],
"description": "The entire node, as it appeared before it was modified."
},
"paths": {
"type": "array",
"items": [
{
"type": "string",
"pattern": "^[a-zA-Z_]{1}[\\w\\.]*$"
}
],
"uniqueItems": true,
"additionalProperties": false,
"description": "The names of the fields this update command should apply changes to. Nested paths can be referenced using dot notation."
}
},
"required": [
"_schema",
"command_id",
"node_ref",
"new_node"
],
"definitions": {
"app": {
"type": "object",
"anyOf": [
{
"$ref": "http://acme-schemas.gdbots.io/json-schema/gdbots/contexts/app/1-0-0.json#"
}
]
},
"cloud": {
"type": "object",
"anyOf": [
{
"$ref": "http://acme-schemas.gdbots.io/json-schema/gdbots/contexts/cloud/1-0-0.json#"
}
]
},
"node": {
"type": "object",
"anyOf": [
{
"$ref": "http://acme-schemas.gdbots.io/json-schema/gdbots/ncr/mixin/node/1-0-0.json#"
}
]
}
},
"additionalProperties": false
}
11 changes: 11 additions & 0 deletions gh-pages/json-schema/gdbots/ncr/command/update-node/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html>
<body>
<h1>Gdbots Acme Schemas</h1>
<hr/>
<pre>
<a href="../">../</a>
<a href="1-0-0.json">1-0-0.json</a>
<a href="latest.json">latest.json</a>
</pre>
</body>
</html>
Loading

0 comments on commit 70719ab

Please sign in to comment.