Skip to content

InputGeometry validation #40

Description

@Henner25

Analyse

We have currently a long list of possible errors for invalid geometry input:

body/inputGeometries[0].geometry should have required property 'x'",
        "body/inputGeometries[0].geometry should have required property 'x'",
        "body/inputGeometries[0].geometry should have required property 'paths'",
        "body/inputGeometries[0].geometry should have required property 'rings'",
        "body/inputGeometries[0].geometry should match some schema in anyOf",
        "body/inputGeometries[0] should NOT have additional properties 'attributes'",
        "body/inputGeometries[0] should have required property 'type'",
        "body/inputGeometries[0].geometry should NOT have additional properties 'test'",
        "body/inputGeometries[0].geometry should NOT have additional properties 'x0'",
        "body/inputGeometries[0].geometry should NOT have additional properties 'y'",
        "body/inputGeometries[0].geometry should NOT have additional properties 'spatialReference'",
        "body/inputGeometries[0].geometry should have required property 'type'",
 [...]

It is possilble to create more readable errors from the output of our validation. But automatic detection of the the openAPI document and referencing the $ref attribute is currently not possible in a reasonable time window (see #36). We will add a notice in the board and consider the usage of Zod for future usage.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions