diff --git a/planetiler-custommap/planetilerspec.schema.json b/planetiler-custommap/planetilerspec.schema.json index 1cc463c729..f2e1519d55 100644 --- a/planetiler-custommap/planetilerspec.schema.json +++ b/planetiler-custommap/planetilerspec.schema.json @@ -25,11 +25,19 @@ }, "geometry": { "description": "Geometry type of the input feature", - "type": "string", - "enum": [ - "polygon", - "line", - "point" + "oneOf": [ + { + "type": "string", + "enum": [ + "polygon", + "line", + "point" + ] + }, + { + "type": "string", + "pattern": "^(POLYGON|LINESTRING|POINT) " + } ] }, "tags": { diff --git a/planetiler-custommap/pom.xml b/planetiler-custommap/pom.xml index 39a8641768..7860e8180d 100644 --- a/planetiler-custommap/pom.xml +++ b/planetiler-custommap/pom.xml @@ -63,6 +63,73 @@ true + + + com.dataliquid + json-yaml-validator-maven-plugin + 1.0.0 + + + + validate-positive-yaml + validate + + validate + + + . + + src/test/resources/validSchema/*.yml + src/main/resources/samples/*.yml + + + src/main/resources/samples/*.spec.yml + + src/main/resources/samples/shortbread.yml + + planetiler.schema.json + + + + + validate-positive-spec-yaml + validate + + validate + + + . + + src/main/resources/samples/*.spec.yml + + planetilerspec.schema.json + + + + + + + +