All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.evomaster.client.java.instrumentation.object.GeoJsonPointToOasConverter Maven / Gradle / Ivy

The newest version!
package org.evomaster.client.java.instrumentation.object;

/**
 * Point: {type: "Point", coordinates: [[longitude,latitude]]}
 * type "Point" is case-sensitive
 * GeoJsonPoint Documentation
 */
public class GeoJsonPointToOasConverter extends CustomTypeToOasConverter {
    @Override
    public String convert() {
        return "{\"type\":\"object\", \"properties\": {\"coordinates\": {\"type\":\"array\", \"items\":{\"type\":\"number\", \"format\":\"double\"}, \"minItems\": 2,  \"maxItems\": 2}, \"type\": {\"type\":\"string\", \"enum\":[\"Point\"]}}, \"required\": [\"coordinates\", \"type\"]}";
    }

    @Override
    public boolean isInstanceOf(Class klass) {
        return klass.getName().equals("org.springframework.data.mongodb.core.geo.GeoJsonPoint");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy