

swagger: "2.0"
info:
  description: "Dashboard API for several use."
  version: 1.0.0
  title: SS6 Dashboard
  termsOfService: "http://transformore.net"
  contact:
    email: ss6@ppa.co.id
host: api12.ppa-mhu.net
basePath: /v2
schemes:
  - http
paths:
  "/hcga/data/karyawan/sakit/add":
    post:
      tags:
        - hcga-surat-sakit
      summary: Add new data for a sick employee
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                nrp:
                  type: string
                  description: NRP (Employee ID) of the sick employee
                  required: true
                dept:
                  type: string
                  description: Department of the sick employee
                  required: true
                tanggal_sakit:
                  type: string
                  format: date
                  description: Date when the employee fell sick (YYYY-MM-DD)
                  required: true
                tgl_izin_awal:
                  type: string
                  format: date
                  description: Start date of the medical leave (YYYY-MM-DD)
                  required: true
                tgl_izin_akhir:
                  type: string
                  format: date
                  description: End date of the medical leave (YYYY-MM-DD)
                  required: true
                created_by:
                  type: string
                  description: NRP (Employee ID) of the person creating the sick leave record
                  required: true
                keterangan:
                  type: string
                  description: Additional information or notes about the sick leave
                file:
                  type: string
                  format: binary
                  description: File attachment (e.g., medical certificate)
                  required: true
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          schema:
            $ref: "#/definitions/Operation"
      security:
        - api_key: []
  "/hcga/data/karyawan/sakit/update/{id}":
    patch:
      tags:
        - hcga-surat-sakit
      summary: Update data for a sick employee
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
          description: ID of the sick employee record
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                modified_by:
                  type: string
                  required: true
                  description: NRP (Employee ID) of the modifier. Required.
                status:
                  type: string
                  enum: ['1', '2']
                  required: true
                  description: Status code. Required. Must be either '1' or '2'.
                reason_approval:
                  type: string
                  description: Reason for approval (optional) when status 2 it will be required.
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          schema:
            $ref: "#/definitions/Operation"
      security:
        - api_key: []
  "/hcga/data/karyawan/sakit":
    get:
      tags:
        - hcga-surat-sakit
      summary: Get sick employee data
      parameters:
        - in: query
          name: departemen
          schema:
            type: string
          description: Filter by department (e.g., 'COE', 'HCG', 'ENG', 'ALL(all dept)')
        - in: query
          name: status
          schema:
            type: string
          description: Filter by status ('0' for waiting,'1' for accepted, '2' for rejected, or 'ALL' for all status )
        - in: query
          name: startedDate
          schema:
            type: string
            format: date
          description: Filter by start date (YYYY-MM-DD)
        - in: query
          name: endedDate
          schema:
            type: string
            format: date
          description: Filter by end date (YYYY-MM-DD)
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          schema:
            $ref: "#/definitions/Operation"
      security:
        - api_key: []
  "/hcga/data/karyawan/sakit/detail/{id}":
    get:
      tags:
        - hcga-surat-sakit
      summary: see detail data for people who sick
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
          description: ID of the sick employee record
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          schema:
            $ref: "#/definitions/Operation"
      security:
        - api_key: []      
  
# securityDefinitions:
# petstore_auth:
#   type: oauth2
#   authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
#   flow: implicit
#   scopes:
#     'write:pets': modify pets in your account
#     'read:pets': read your pets
# api_key:
#   type: apiKey
#   name: api_key
#   in: header
definitions:
  Operation:
    title: a Production
    description: A Production
    type: object
    required:
      - name
      - photoUrls
    properties:
      id:
        type: integer
        format: int64
      name:
        type: string
        example: doggie
      photoUrls:
        type: array
        xml:
          name: photoUrl
          wrapped: true
        items:
          type: string
      tags:
        type: array
        xml:
          name: tag
          wrapped: true
      status:
        type: string
        description: pet status in the store
        enum:
          - available
          - pending
          - sold
      message:
        type: string
    xml:
      name: Pet
  ApiResponse:
    title: An uploaded response
    description: Describes the result of uploading an image resource
    type: object
    properties:
      code:
        type: integer
        format: int32
      type:
        type: string
      message:
        type: string
  #issue: https://github.com/swagger-api/swagger-codegen/issues/7980
  Amount:
    type: object
    description: >
      some description
    properties:
      value:
        format: double
        type: number
        minimum: 0.01
        maximum: 1000000000000000
        description: >
          some description
      currency:
        $ref: "#/definitions/Currency"
    required:
      - value
      - currency
  Currency:
    type: string
    pattern: "^[A-Z]{3,3}$"
    description: >
      some description