openapi: 3.0.3
info:
  title: common
  version: 0.0.1
  description: Common models and resources used by all services.
paths:
  /_internal_/healthcheck:
    get:
      description: Get the current health of the service.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeNccloudCommonV0ModelsHealthCheck'
  /_internal_/probe/live:
    get:
      description: Endpoint for liveliness probe.
      responses:
        '200':
          description: Service is live.
  /_internal_/probe/ready:
    get:
      description: Endpoint for readiness probe.
      responses:
        '200':
          description: Service is ready and can receive traffic.
        '400':
          description: Service is not ready for receiving traffic.
  /_internal_/service:
    get:
      description: Get information about the deployed service.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeNccloudCommonV0ModelsServiceInfo'
components:
  schemas:
    DeNccloudCommonV0ModelsErrorLinks:
      description: Links to further information about the occurred error.
      type: object
      properties:
        about:
          $ref: '#/components/schemas/DeNccloudCommonV0UnionsLink'
          description: A link that leads to further details about this particular
            occurrence of the problem.
        type:
          $ref: '#/components/schemas/DeNccloudCommonV0UnionsLink'
          description: A link that identifies the type of the error that this particular
            error is an instance of.
    DeNccloudCommonV0ModelsGenericError:
      description: An error returned on failed API requests.
      type: object
      required:
      - code
      - title
      - detail
      properties:
        links:
          $ref: '#/components/schemas/DeNccloudCommonV0ModelsErrorLinks'
        code:
          description: An app specific error code.
          type: string
        title:
          description: A short human readable summary of the problem.
          type: string
        detail:
          description: A human readable explanation of the problem.
          type: string
        source:
          $ref: '#/components/schemas/DeNccloudCommonV0ModelsErrorSource'
        meta:
          description: Non-standard meta-information about the error.
          type: object
          additionalProperties: true
    DeNccloudCommonV0ModelsPageResponse:
      description: Paging information returned from a paged request.
      type: object
      required:
      - offset
      - limit
      - sort
      - total_results
      - total_pages
      properties:
        offset:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
        sort:
          type: array
          items:
            $ref: '#/components/schemas/DeNccloudCommonV0ModelsSort'
        total_results:
          description: Total number of results that can potentially be returned.
          type: integer
          format: int64
        total_pages:
          description: Total number of pages that can potentially be returned.
          type: integer
          format: int64
    DeNccloudCommonV0ModelsErrorSource:
      description: Reference to the primary source of an error.
      type: object
      required:
      - type
      - source
      properties:
        type:
          $ref: '#/components/schemas/DeNccloudCommonV0EnumsErrorSourceType'
        source:
          description: The source of the problem in the form specified by `type`.
          type: string
    DeNccloudCommonV0ModelsSort:
      description: Single property to sort by.
      type: object
      required:
      - property
      - direction
      properties:
        property:
          description: The property by which the results should be sorted.
          type: string
        direction:
          $ref: '#/components/schemas/DeNccloudCommonV0EnumsSortDirection'
          description: The direction in which the results should be sorted.
    DeNccloudCommonV0ModelsAudit:
      description: Basic audit information for a resource.
      type: object
      required:
      - created_at
      - created_by
      - updated_at
      - updated_by
      properties:
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
          format: uuid
        updated_at:
          type: string
          format: date-time
        updated_by:
          type: string
          format: uuid
    DeNccloudCommonV0ModelsLinkObject:
      description: Represents a link with some meta information.
      type: object
      required:
      - href
      properties:
        href:
          description: An URI-reference pointing to the links target.
          type: string
        title:
          description: A human-readable label for the link.
          type: string
        type:
          description: Optional media type of the link's target.
          type: string
    DeNccloudCommonV0ModelsServiceInfo:
      description: Information about a deployed service.
      type: object
      required:
      - name
      - version
      - uri
      properties:
        name:
          type: string
        version:
          type: string
        uri:
          description: URI under which this service is deployed.
          type: string
        title:
          description: A human-readable title of the service.
          type: string
        description:
          description: A human-readable description of the service.
          type: string
    DeNccloudCommonV0ModelsPagingForm:
      description: Form containing paging information.
      type: object
      required:
      - offset
      - limit
      properties:
        offset:
          description: Offset of the current page. The pages are 0-indexed, meaning
            the first page starts at 0.
          type: integer
          format: int32
        limit:
          description: The number of results to be returned by the api.
          type: integer
          format: int32
        sort:
          description: Defines multiple properties for the results to be sorted by.
            The order of the definition defines the priority. If omitted, the service
            will use an implementation dependent default sort.
          type: array
          items:
            $ref: '#/components/schemas/DeNccloudCommonV0ModelsSort'
    DeNccloudCommonV0ModelsHealthCheck:
      description: Indicating the health of a service.
      type: object
      required:
      - status
      properties:
        status:
          $ref: '#/components/schemas/DeNccloudCommonV0EnumsHealthStatus'
        message:
          description: An optional message giving more detailed information about
            the current health.
          type: string
    DeNccloudCommonV0EnumsErrorSourceType:
      description: Type of an error source.
      type: string
      enum:
      - pointer
      - parameter
      - header
    DeNccloudCommonV0EnumsSortDirection:
      description: The direction in which to sort by a property.
      type: string
      enum:
      - asc
      - desc
    DeNccloudCommonV0EnumsHealthStatus:
      description: The status of a service.
      type: string
      enum:
      - running
      - starting
      - unhealthy
    DeNccloudCommonV0UnionsLink:
      description: Represents a link to a resource.
      oneOf:
      - $ref: '#/components/schemas/String'
      - $ref: '#/components/schemas/DeNccloudCommonV0ModelsLinkObject'
