-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
500 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
239 changes: 239 additions & 0 deletions
239
gh-pages/json-schema/gdbots/ncr/command/update-node/1-0-0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
11
gh-pages/json-schema/gdbots/ncr/command/update-node/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.