openapi: 3.0.0
info:
  title: General API
  version: '1.0'
  description: >-
    The Tidepool API is an HTTP REST API used by Tidepool clients use to
    communicate with the Tidepool Platform.


    For more information, see the [Getting Started](../docs/quick-start.md)
    section.
  termsOfService: https://developer.tidepool.org/terms-of-use
  contact:
    name: API Support
    url: https://support.tidepool.org/
    email: support@tidepool.org
  license:
    name: BSD-2-Clause
    url: https://github.com/tidepool-org/shoreline/blob/master/LICENSE
  x-tidepool-service: https://github.com/tidepool-org/jellyfish
servers:
  - url: https://external.integration.tidepool.org
    description: integration
  - url: https://api.tidepool.org
    description: production
  - url: https://dev1.dev.tidepool.org
    description: dev1
  - url: https://qa1.development.tidepool.org
    description: qa1
  - url: https://qa2.development.tidepool.org
    description: qa2
tags:
  - name: Internal
    description: APIs intended for internal use by Tidepool.
  - name: General
    description: General utility APIs.
paths:
  /info:
    get:
      operationId: GetMinimumClientVersions
      summary: Get Minimum Client Versions
      description: >-
        Returns minimum Tidepool client application versions. If a client
        application detects that it is older than the minimum version returned
        by this API, it should notify the user and terminate promptly. This API
        requires no authentication or authorization.
      responses:
        '200':
          $ref: '#/components/responses/ClientVersions'
      security: []
      tags:
        - General
        - Internal
      x-tidepool-service: https://github.com/tidepool-org/jellyfish
components:
  responses:
    ClientVersions:
      description: Tidepool Minimum Client Versions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/minimumclientversions.v1'
  schemas:
    semanticversion.v1:
      title: Semantic Version Number
      description: >-
        [Semantic Version Number 2.0.0](http://semver.org/). Regex from their
        [site](https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string).
      type: string
      minLength: 5
      pattern: >-
        ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
      example: 2.36.1
    minimumclientversions.v1:
      title: Minimum Tidepool Client Versions
      description: >-
        Lists minimum version numbers of Tidepool client applications. The
        version numbers are represented as Semantic Versions. When a client
        application fetches this object, it should compare its version number
        against the minimum version here.
      type: object
      properties:
        versions:
          type: object
          properties:
            uploaderMinimum:
              $ref: '#/components/schemas/semanticversion.v1'
          required:
            - uploaderMinimum
      additionalProperties: true
      required:
        - versions
