Skip to content

JSON schema validation only allows alphanumeric property names #144

Closed
@Plenituz

Description

@Plenituz

When using a valid template with non alphanumeric names for the properties, omniparser refuses the template because of patternProperties declaration such as this one: https://github.com/jf-tech/omniparser/blob/master/extensions/omniv21/validation/transformDeclarations.json#L87, in combination with the additionalProperties: false

Example of a template (notice the $ in the property name):

{
    "parser_settings": {
        "version": "omni.2.1",
        "file_format_type": "json"
    },
    "transform_declarations": {
        "FINAL_OUTPUT": {
            "object": {
                "$test": { "xpath": "/foo/bar" }
            }
        }
    }
}

Which returns this error:

transform_declarations.FINAL_OUTPUT.object: Additional property $test is not allowed
transform_declarations.FINAL_OUTPUT.object: Additional property $test is not allowed
transform_declarations.FINAL_OUTPUT: Must validate one and only one schema (oneOf)
transform_declarations.FINAL_OUTPUT: Must validate one and only one schema (oneOf)

Happy to provide additional information if needed.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions