Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion backend-contract/generated/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"info": {
"title": "VolView neutral backend contract",
"version": "0.1.0",
"version": "0.2.0",
"description": "DRAFT 0.x — shapes may change until a second backend passes the conformance kit (the pinned 1.0 criterion). The neutral REST surface the VolView client calls to run processing tasks against a backend. A conforming server-side BACKEND implements these endpoints and the referenced wire schemas — no VolView client change is needed to bring a new backend online. Everything here is neutral: no backend routes, ids, status enums, or URL shapes leak. The artifact version is the draft artifact version, distinct from the shape versions: the result-intent vocabulary is at version 2 (INTENT_VOCABULARY_VERSION); the task-spec shape at version 1 (specVersion)."
},
"servers": [
Expand Down Expand Up @@ -715,6 +715,10 @@
"items": {
"type": "string"
}
},
"multiple": {
"description": "When true, the parameter receives every segment group whose parent is the active dataset, serialized one file per group in store order. When absent or false, it receives only the actively selected group.",
"type": "boolean"
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions backend-contract/generated/task-spec.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@
"items": {
"type": "string"
}
},
"multiple": {
"description": "When true, the parameter receives every segment group whose parent is the active dataset, serialized one file per group in store order. When absent or false, it receives only the actively selected group.",
"type": "boolean"
}
},
"required": [
Expand Down
2 changes: 1 addition & 1 deletion backend-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@volview/backend-contract",
"version": "0.1.0",
"version": "0.2.0",
"private": true
}
11 changes: 11 additions & 0 deletions backend-contract/processing/__tests__/task-spec.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ describe('task-spec field kinds', () => {
);
});

it('preserves sourceRef multiplicity when a backend declares it', () => {
expect(
taskParameterSchema.parse({
kind: 'sourceRef',
id: 'segmentations',
accepts: ['labelmap'],
multiple: true,
})
).toMatchObject({ multiple: true });
});

it('carries numeric constraints + default on an int param', () => {
expect(paramById('synthetic-all-kinds', 'radius')).toMatchObject({
kind: 'int',
Expand Down
2 changes: 1 addition & 1 deletion backend-contract/processing/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export const buildOpenApiDocument = (): Record<string, unknown> => ({
// VERSION / specVersion) below. It is deliberately literal, not derived from
// the shape-version constants — the artifact and the shapes version on
// separate clocks.
version: '0.1.0',
version: '0.2.0',
description:
'DRAFT 0.x — shapes may change until a second backend passes the ' +
'conformance kit (the pinned 1.0 criterion). ' +
Expand Down
6 changes: 6 additions & 0 deletions backend-contract/processing/task-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ const sourceRefParam = z.object({
kind: z.literal('sourceRef'),
...paramCommon,
accepts: z.array(typeTagSchema).min(1),
multiple: z
.boolean()
.optional()
.describe(
'When true, the parameter receives every segment group whose parent is the active dataset, serialized one file per group in store order. When absent or false, it receives only the actively selected group.'
),
});

const boundsParam = z.object({
Expand Down
Loading
Loading