-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The ProcessorRsrc model in models.py is extending the BaseModel it should rather extend Resource.
Resource(BaseModel)
ProcessorRsrc(BaseModel)
WorkspaceRsrc(Resource)
WorkflowRsrc(Resource)
From the openapi.yml spec:
Resource:
type: object
required: ['@id']
properties:
'@id':
type: string
description: URL of this thing
description:
type: string
description: Description of the thing
Workspace:
allOf:
- {$ref: '#/components/schemas/Resource'}
Workflow:
allOf:
- {$ref: '#/components/schemas/Resource'}
Processor:
description: The ocrd-tool.json for a specific tool
x-$ref: 'https://ocr-d.de/ocrd_tool.schema.json#/properties/tools/patternProperties/ocrd-.*'
Since the Processor model does not have field id we cannot directly extend the Resource model.
I suggest the following correction in the openapi.yml spec:
Processor:
id: ocrd-.*
description: The ocrd-tool.json for a specific tool
x-$ref: 'https://ocr-d.de/ocrd_tool.schema.json#/properties/tools/patternProperties/ocrd-.*'
Then this will be possible:
Resource(BaseModel)
ProcessorRsrc(Resource)
WorkspaceRsrc(Resource)
WorkflowRsrc(Resource)
Metadata
Metadata
Assignees
Labels
No labels