{
  "swagger": "2.0",
  "info": {
    "description": "Microservice which expose Gis Data.",
    "version": "0.0.1",
    "title": "Gis Microservice API",
    "contact": {}
  },
  "host": "dev-motion.cwbyminsait.com",
  "basePath": "/gis",
  "tags": [
    {
      "name": "gis-controller",
      "description": "GIS Controller"
    }
  ],
  "schemes": [
    "http",
    "https"
  ],
  "produces": [
    "application/json",
    "application/yaml",
    "text/plain"
  ],
  "paths": {
    "/v1/gis": {
      "get": {
        "tags": [
          "gis-controller"
        ],
        "summary": "Get GIS Elements",
        "description": "Return the GIS Elements",
        "operationId": "getGISElementUsingGET",
        "parameters": [
          {
            "name": "routeId",
            "in": "query",
            "description": "Filter route id",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. ",
            "schema": {
              "$ref": "#/definitions/GISLayerDTO"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    },
    "/v1/gis/asset/{assetId}/nearest": {
      "get": {
        "tags": [
          "gis-controller"
        ],
        "summary": "Get if an Asset is near a Gis Element",
        "description": "Return true if the asset is near",
        "operationId": "getAssetNearUsingGET",
        "parameters": [
          {
            "name": "assetId",
            "in": "query",
            "description": "Asset",
            "required": false,
            "type": "string"
          },
          {
            "name": "distance",
            "in": "query",
            "description": "Distance in meters",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. ",
            "schema": {
              "$ref": "#/definitions/GISLayerDTO"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    },
    "/v1/gis/asset/{assetId}/route": {
      "get": {
        "tags": [
          "gis-controller"
        ],
        "summary": "Get Asset Route",
        "description": "Return the Geometry associated to the route",
        "operationId": "getAssetRouteUsingGET",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "description": "Asset",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. ",
            "schema": {
              "$ref": "#/definitions/GISLayerDTO"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    },
    "/v1/gis/assets": {
      "get": {
        "tags": [
          "gis-controller"
        ],
        "summary": "Get Assets",
        "description": "Return the assets",
        "operationId": "getAssetGisUsingGET",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Filter type",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. ",
            "schema": {
              "$ref": "#/definitions/GISLayerDTO"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    }
  },
  "definitions": {
    "AbstractFeaturePropertiesDTO": {
      "type": "object",
      "title": "AbstractFeaturePropertiesDTO"
    },
    "FeatureDTO": {
      "type": "object",
      "properties": {
        "geometry": {
          "$ref": "#/definitions/GeometryDTO"
        },
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/AbstractFeaturePropertiesDTO"
        },
        "type": {
          "type": "string"
        }
      },
      "title": "FeatureDTO"
    },
    "GISLayerDTO": {
      "type": "object",
      "properties": {
        "features": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FeatureDTO"
          }
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "title": "GISLayerDTO"
    },
    "GeometryDTO": {
      "type": "object",
      "properties": {
        "coordinates": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "type": {
          "type": "string"
        }
      },
      "title": "GeometryDTO"
    }
  }
}
