Skip to content
New issue

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

Can't save an instance containing 0-N multiple input element which is composed of 4-N multiple input sub-element. #1185

Open
yancao77 opened this issue May 25, 2023 · 0 comments

Comments

@yancao77
Copy link

Example:
The geoLocationPolygon consists of two sub-elements: Polygon Point and In Polygon Point. The geoLocationPolygon allows for multiple inputs, ranging from 0 to N, while the Polygon Point sub-element also permits multiple inputs, ranging from 4 to N.
image

When attempting to populate an instance of geoLocationPolygon, a server error is encountered.

{
  "validationReport": {
    "validates": "false",
    "warnings": [],
    "errors": [
      {
        "message": "object has missing required properties (['@context','@id','pointLatitude','pointLongitude'])",
        "location": "/geoLocationPolygon/0/polygonPoint/3",
        "additionalInfo": {
          "schemaFile": "#",
          "schemaPointer": "/properties/geoLocationPolygon/items/properties/polygonPoint/items"
        }
      },
      {
        "message": "object has missing required properties (['@context','@id','pointLatitude','pointLongitude'])",
        "location": "/geoLocationPolygon/0/polygonPoint/0",
        "additionalInfo": {
          "schemaFile": "#",
          "schemaPointer": "/properties/geoLocationPolygon/items/properties/polygonPoint/items"
        }
      },
      {
        "message": "object has missing required properties (['@context','@id','pointLatitude','pointLongitude'])",
        "location": "/geoLocationPolygon/0/polygonPoint/2",
        "additionalInfo": {
          "schemaFile": "#",
          "schemaPointer": "/properties/geoLocationPolygon/items/properties/polygonPoint/items"
        }
      },
      {
        "message": "object has missing required properties (['@context','@id','pointLatitude','pointLongitude'])",
        "location": "/geoLocationPolygon/0/polygonPoint/1",
        "additionalInfo": {
          "schemaFile": "#",
          "schemaPointer": "/properties/geoLocationPolygon/items/properties/polygonPoint/items"
        }
      }
    ]
  }
}

If we checked the JSON-LD of this instance, there is nothing in polygonPoint.
image

However, by modifying the multiple input range of geoLocationPolygon from 0-N to 1-N, the error is resolved, and instances can now be saved successfully.

@yancao77 yancao77 changed the title Can't save an instance containing 0-N multiple input element which is composed of 4-n multiple input sub-element. Can't save an instance containing 0-N multiple input element which is composed of 4-N multiple input sub-element. May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant