Skip to content

Commit

Permalink
fix ocrd_tool.schema.yml cardinality oneOf syntax, update spec
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Aug 15, 2024
1 parent 678158a commit 228272b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
2 changes: 1 addition & 1 deletion repo/spec
43 changes: 19 additions & 24 deletions src/ocrd_validators/ocrd_tool.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ properties:
type: string
pattern: '^[0-9]+\.[0-9]+\.[0-9]+$'
git_url:
description: Github/Gitlab URL
description: GitHub/GitLab URL
type: string
format: url
dockerhub:
Expand All @@ -37,46 +37,41 @@ properties:
type: string
input_file_grp:
deprecated: true
description: Input fileGrp@USE this tool expects by default
description: (DEPRECATED) Input fileGrp@USE this tool expects by default
type: array
items:
type: string
# pattern: '^OCR-D-[A-Z0-9-]+$'
output_file_grp:
deprecated: true
description: Output fileGrp@USE this tool produces by default
description: (DEPRECATED) Output fileGrp@USE this tool produces by default
type: array
items:
type: string
# pattern: '^OCR-D-[A-Z0-9-]+$'
input_file_grp_cardinality:
description: Number of (comma-separated) input fileGrp@USE this tool expects (either an exact value or a minimum,maximum list with -1 for unlimited)
oneOf:
- items:
- type: number
multipleOf: 1
- type: array
items:
type: number
multipleOf: 1
- items:
type: array
items:
type: number
multipleOf: 1
minItems: 2
maxItems: 2
minItems: 2
maxItems: 2
default: 1
additionalProperties: false
output_file_grp_cardinality:
description: Number of (comma-separated) output fileGrp@USE this tool expects (either an exact value or a minimum,maximum list with -1 for unlimited)
oneOf:
- items:
- type: number
multipleOf: 1
- type: array
items:
type: number
multipleOf: 1
- items:
type: array
items:
type: number
multipleOf: 1
minItems: 2
maxItems: 2
minItems: 2
maxItems: 2
default: 1
parameters:
description: Object describing the parameters of a tool. Keys are parameter names, values sub-schemas.
Expand Down Expand Up @@ -152,9 +147,9 @@ properties:
description: "If parameter is reference to file: Whether the file should be cached, e.g. because it is large and won't change."
default: false
description:
description: Concise description what the tool does
description: Concise description of what the tool does
categories:
description: Tools belong to this categories, representing modules within the OCR-D project structure
description: Tools belong to these categories, representing modules within the OCR-D project structure
type: array
items:
type: string
Expand Down Expand Up @@ -229,12 +224,12 @@ properties:
default: 'as-is'
path_in_archive:
type: string
description: if type is archive, the resource is at this location in the archive
description: If type is archive, the resource is at this location in the archive
default: '.'
version_range:
type: string
description: Range of supported versions, syntax like in PEP 440
default: '>= 0.0.1'
size:
type: number
description: Size of the resource in bytes
description: "Size of the resource in bytes to be retrieved (for archives: size of the archive)"

0 comments on commit 228272b

Please sign in to comment.