You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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-.*'
I think the issue belongs to https://github.com/OCR-D/spec. In my opinion the reasons are wrong: the spec should not be changed so the code can be improved, the spec should just care about if itself makes sense or not.
I think the idea behind the processor-response is just to return the ocrd-tool.json. I don't know why one would need the ocrd-tool.json but I would think adding a/the id would change the output and a user gets something that is not expected. But I could be wrong of course
I already see an opened issue there. It is more general but in the same direction. The suggestion is not made just to improve the code, but the spec as well.
The
ProcessorRsrc
model inmodels.py
is extending theBaseModel
it should rather extendResource
.From the openapi.yml spec:
Since the
Processor
model does not have fieldid
we cannot directly extend theResource
model.I suggest the following correction in the openapi.yml spec:
Then this will be possible:
The text was updated successfully, but these errors were encountered: