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

GeoJSON not supported #11

Open
nitrag opened this issue Aug 27, 2016 · 2 comments
Open

GeoJSON not supported #11

nitrag opened this issue Aug 27, 2016 · 2 comments

Comments

@nitrag
Copy link

nitrag commented Aug 27, 2016

I think there is a clash because the GeoJSON object has a object called properties.

@nitrag
Copy link
Author

nitrag commented Aug 27, 2016

Here's my schema, all objects under a geojson.features[0].properties are being included instead of only name/id like I want. So the schema is ignored. Working for geometry though...

var schema = {
    "title": "Simple GeoJSON Schema",
    "type": "object",
    "properties": {
      "type": {
        "type": "string"
      },
      "features":{
        "type": "array",
        "required": true,
        "items": { 
          "type": "object",
          "required": true,
          "properties": {
            "type": {
              "type": "string"
            },
            "geometry": {
              "type": "object",
              "required": true,
              "items": {
                "type": "object",
                "required": true,
                "properties": {
                  "type": {
                    "type": "string",
                    "required": true
                  },
                  "coordinates": {
                    "type": "array",
                    "required": true
                  }
                }
              }
            },
            "properties": {
              "type": "object",
              "required": true,
              "items": {
                "type":"object",
                "required":true,
                "properties": {
                  "name": {
                    "type": "string",
                    "required": true
                  },
                  "id": {
                    "type": "string",
                    "required": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "required": ["geometry", "properties"]
};

@alank64
Copy link
Owner

alank64 commented Dec 20, 2016

Hey, I think if I understand correctly, geoJSON definition conflicts with the JSONSchema standard? Are we talking about a specific exception or standards issue here? I will read up more on this, but wondering if is more a conflict with geoJSON and JSONScema issue?

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

2 participants