We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since #206 we can moderately restrict an ocrd-tool parameter of type object's properties and even set additionalProperties:
parameter
object
properties
additionalProperties
spec/ocrd_tool.schema.yml
Lines 95 to 100 in 506b339
However, according to the JSON data schema, additionalProperties is either false or an object (i.e. dict) itself.
false
For example, in ocrd-kraken-recognize I'd like to have:
"blla_classes": { "description": "Class mapping for the region types trained into blla_model.", "type": "object", "minProperties": 2, "additionalProperties": { "type": "string", "enum": ["TextRegion", "ImageRegion", "LineDrawingRegion", "GraphicRegion", "TableRegion", "ChartRegion", "MapRegion", "SeparatorRegion", "MathsRegion", "ChemRegion", "MusicRegion", "AdvertRegion", "NoiseRegion", "UnknownRegion", "CustomRegion"] }, "default": {"text": "TextRegion", "image": "ImageRegion", "line drawing": "LineDrawingRegion", "graphic": "GraphicRegion", "table": "TableRegion", "chart": "ChartRegion", "map": "MapRegion", "separator": "SeparatorRegion", "maths": "MathsRegion", "chem": "ChemRegion", "music": "MusicRegion", "advert": "AdvertRegion", "noise": "NoiseRegion", "unknown": "UnknownRegion", "custom": "CustomRegion"}
That is: allow only certain types of properties (namely all PAGE-XML region type names).
This is currently not possible to express.
Also, minProperties and maxProperties is missing entirely.
minProperties
maxProperties
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Since #206 we can moderately restrict an ocrd-tool
parameter
of typeobject
'sproperties
and even setadditionalProperties
:spec/ocrd_tool.schema.yml
Lines 95 to 100 in 506b339
However, according to the JSON data schema,
additionalProperties
is eitherfalse
or anobject
(i.e. dict) itself.For example, in ocrd-kraken-recognize I'd like to have:
That is: allow only certain types of properties (namely all PAGE-XML region type names).
This is currently not possible to express.
Also,
minProperties
andmaxProperties
is missing entirely.The text was updated successfully, but these errors were encountered: