Repository navigation
[WIP] Fix issue in job step execution #433
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,15 +12,27 @@ description: Odata protocol schemas | |||||
| ## TypeScript Usage | ||||||
|
|
||||||
| ```typescript | ||||||
| import { ODataErrorSchema, ODataFilterFunctionSchema, ODataFilterOperatorSchema, ODataMetadataSchema, ODataQuerySchema, ODataResponseSchema } from '@objectstack/spec/api'; | ||||||
| import type { ODataError, ODataFilterFunction, ODataFilterOperator, ODataMetadata, ODataQuery, ODataResponse } from '@objectstack/spec/api'; | ||||||
| import { ODataConfigSchema, ODataErrorSchema, ODataFilterFunctionSchema, ODataFilterOperatorSchema, ODataMetadataSchema, ODataQuerySchema, ODataResponseSchema } from '@objectstack/spec/api'; | ||||||
| import type { ODataConfig, ODataError, ODataFilterFunction, ODataFilterOperator, ODataMetadata, ODataQuery, ODataResponse } from '@objectstack/spec/api'; | ||||||
|
|
||||||
| // Validate data | ||||||
| const result = ODataErrorSchema.parse(data); | ||||||
| const result = ODataConfigSchema.parse(data); | ||||||
|
||||||
| const result = ODataConfigSchema.parse(data); | |
| const result = ODataErrorSchema.parse(data); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "$ref": "#/definitions/BatchConfig", | ||
| "definitions": { | ||
| "BatchConfig": { | ||
| "type": "object", | ||
| "properties": { | ||
| "enabled": { | ||
| "type": "boolean", | ||
| "default": true, | ||
| "description": "Enable batch operations" | ||
| }, | ||
| "maxRecordsPerBatch": { | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "maximum": 1000, | ||
| "default": 200, | ||
| "description": "Maximum records per batch" | ||
| }, | ||
| "defaultOptions": { | ||
| "type": "object", | ||
| "properties": { | ||
| "atomic": { | ||
| "type": "boolean", | ||
| "default": true, | ||
| "description": "If true, rollback entire batch on any failure (transaction mode)" | ||
| }, | ||
| "returnRecords": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "If true, return full record data in response" | ||
| }, | ||
| "continueOnError": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "If true (and atomic=false), continue processing remaining records after errors" | ||
| }, | ||
| "validateOnly": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "If true, validate records without persisting changes (dry-run mode)" | ||
| } | ||
| }, | ||
| "additionalProperties": false, | ||
| "description": "Default batch options" | ||
| } | ||
| }, | ||
| "additionalProperties": true | ||
| } | ||
| }, | ||
| "$schema": "http://json-schema.org/draft-07/schema#" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| { | ||
| "$ref": "#/definitions/ODataConfig", | ||
| "definitions": { | ||
| "ODataConfig": { | ||
| "type": "object", | ||
| "properties": { | ||
| "enabled": { | ||
| "type": "boolean", | ||
| "default": true, | ||
| "description": "Enable OData API" | ||
| }, | ||
| "path": { | ||
| "type": "string", | ||
| "default": "/odata", | ||
| "description": "OData endpoint path" | ||
| }, | ||
| "metadata": { | ||
| "type": "object", | ||
| "properties": { | ||
| "namespace": { | ||
| "type": "string", | ||
| "description": "Service namespace" | ||
| }, | ||
| "entityTypes": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "description": "Entity type name" | ||
| }, | ||
| "key": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| }, | ||
| "description": "Key fields" | ||
| }, | ||
| "properties": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "type": "string" | ||
| }, | ||
| "type": { | ||
| "type": "string", | ||
| "description": "OData type (Edm.String, Edm.Int32, etc.)" | ||
| }, | ||
| "nullable": { | ||
| "type": "boolean", | ||
| "default": true | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "type" | ||
| ], | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "navigationProperties": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "type": "string" | ||
| }, | ||
| "type": { | ||
| "type": "string" | ||
| }, | ||
| "partner": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "type" | ||
| ], | ||
| "additionalProperties": false | ||
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "key", | ||
| "properties" | ||
| ], | ||
| "additionalProperties": false | ||
| }, | ||
| "description": "Entity types" | ||
| }, | ||
| "entitySets": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "description": "Entity set name" | ||
| }, | ||
| "entityType": { | ||
| "type": "string", | ||
| "description": "Entity type" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "name", | ||
| "entityType" | ||
| ], | ||
| "additionalProperties": false | ||
| }, | ||
| "description": "Entity sets" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "namespace", | ||
| "entityTypes", | ||
| "entitySets" | ||
| ], | ||
| "additionalProperties": false, | ||
| "description": "OData metadata configuration" | ||
| } | ||
| }, | ||
| "additionalProperties": true | ||
| } | ||
| }, | ||
| "$schema": "http://json-schema.org/draft-07/schema#" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| { | ||
| "$ref": "#/definitions/RealtimeConfig", | ||
| "definitions": { | ||
| "RealtimeConfig": { | ||
| "type": "object", | ||
| "properties": { | ||
| "enabled": { | ||
| "type": "boolean", | ||
| "default": true, | ||
| "description": "Enable realtime synchronization" | ||
| }, | ||
| "transport": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "websocket", | ||
| "sse", | ||
| "polling" | ||
| ], | ||
| "default": "websocket", | ||
| "description": "Transport protocol" | ||
| }, | ||
| "subscriptions": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "id": { | ||
| "type": "string", | ||
| "format": "uuid", | ||
| "description": "Unique subscription identifier" | ||
| }, | ||
| "events": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "type": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "record.created", | ||
| "record.updated", | ||
| "record.deleted", | ||
| "field.changed" | ||
| ], | ||
| "description": "Type of event to subscribe to" | ||
| }, | ||
| "object": { | ||
| "type": "string", | ||
| "description": "Object name to subscribe to" | ||
| }, | ||
| "filters": { | ||
| "description": "Filter conditions" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "type" | ||
| ], | ||
| "additionalProperties": false | ||
| }, | ||
| "description": "Array of events to subscribe to" | ||
| }, | ||
| "transport": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "websocket", | ||
| "sse", | ||
| "polling" | ||
| ], | ||
| "description": "Transport protocol to use" | ||
| }, | ||
| "channel": { | ||
| "type": "string", | ||
| "description": "Optional channel name for grouping subscriptions" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "id", | ||
| "events", | ||
| "transport" | ||
| ], | ||
| "additionalProperties": false | ||
| }, | ||
| "description": "Default subscriptions" | ||
| } | ||
| }, | ||
| "additionalProperties": true | ||
| } | ||
| }, | ||
| "$schema": "http://json-schema.org/draft-07/schema#" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example code has been changed from parsing
BatchOperationResultSchematoBatchConfigSchema. This change doesn't make sense in the context of the documentation - the example should demonstrate the primary use case of the API module. IfBatchConfigSchemais more important, this is a reasonable change, but ifBatchOperationResultSchemawas the better example before, changing it just because a new schema was added is inconsistent.Consider whether this change is intentional or if it should revert to the original example while still documenting the new
BatchConfigSchemaelsewhere in the file.