swagger: "2.0"
basePath: /api/
info:
  title: Georg API
  version: "2.1"
  x-apisguru-categories:
    - location
  x-origin:
    - format: swagger
      url: https://georg.nrm.se/api/swagger.json
      version: "2.0"
  x-providerName: nrm.se
  x-serviceName: georg
tags:
  - description: Georeference tool
    name: georg
paths:
  /autocomplete:
    get:
      description: Return search results in json
      operationId: autoComplete
      parameters:
        - in: query
          name: text
          required: false
          type: string
        - in: query
          name: sources
          required: false
          type: string
        - in: query
          name: layers
          required: false
          type: string
        - in: query
          name: countryCode
          required: false
          type: string
        - format: int32
          in: query
          name: size
          required: false
          type: integer
      produces:
        - application/json
      responses:
        "200":
          description: successful operation
          schema:
            type: string
      summary: Search
      tags:
        - georg
  /coordinates:
    get:
      description: Return search results in json
      operationId: searchCoordinates
      parameters:
        - in: query
          name: coordinates
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: successful operation
          schema:
            type: string
      summary: Search coordinates in different formate
      tags:
        - georg
  /reverse:
    get:
      description: Return search results in json
      operationId: getReverseGeoCode
      parameters:
        - format: double
          in: query
          name: lat
          required: false
          type: number
        - format: double
          in: query
          name: lng
          required: false
          type: number
      produces:
        - application/json
      responses:
        "200":
          description: successful operation
          schema:
            type: string
      summary: Get reverse geocoding
      tags:
        - georg
  /search:
    get:
      description: Return search results in json
      operationId: search
      parameters:
        - in: query
          name: text
          required: false
          type: string
        - in: query
          name: sources
          required: false
          type: string
        - in: query
          name: layers
          required: false
          type: string
        - in: query
          name: countryCode
          required: false
          type: string
        - format: int32
          in: query
          name: size
          required: false
          type: integer
      produces:
        - application/json
      responses:
        "200":
          description: successful operation
          schema:
            type: string
      summary: Get geocoding
      tags:
        - georg
  /upload:
    post:
      consumes:
        - multipart/form-data
      description: Upload csv file with minimum two columns (Id, SourceLocality). Return search results in json
      operationId: uploadFile
      parameters:
        - in: body
          name: body
          required: false
          schema:
            $ref: "#/definitions/MultipartFormDataInput"
        - in: query
          name: type
          required: false
          type: string
      produces:
        - application/octet-stream
      responses:
        "200":
          description: File uploaded
      summary: Batch upload
      tags:
        - georg
definitions:
  InputPart:
    properties:
      bodyAsString:
        type: string
      contentTypeFromMessage:
        type: boolean
      headers:
        additionalProperties:
          items:
            type: string
          type: array
        type: object
      mediaType:
        $ref: "#/definitions/MediaType"
    type: object
  MediaType:
    properties:
      parameters:
        additionalProperties:
          type: string
        type: object
      subtype:
        type: string
      type:
        type: string
      wildcardSubtype:
        type: boolean
      wildcardType:
        type: boolean
    type: object
  MultipartFormDataInput:
    properties:
      formData:
        additionalProperties:
          $ref: "#/definitions/InputPart"
        type: object
      formDataMap:
        additionalProperties:
          items:
            $ref: "#/definitions/InputPart"
          type: array
        type: object
      parts:
        items:
          $ref: "#/definitions/InputPart"
        type: array
      preamble:
        type: string
    type: object
