swagger: "2.0"
info:
  description: "Dashboard API for several use."
  version: 1.0.0
  title: SS6 Dashboard
  termsOfService: "https://transformore.net"
  contact:
    email: ss6@ppa.co.id
host: api33.transformore.net
basePath: /v2
schemes:
  - https
paths:
  "/v1/mom?tanggal={tanggal}":
    get:
      tags:
        - Mom
      summary: Find mom by tanggal
      description: Returns mom by tanggal
      operationId: mom by tanggal
      produces:
        - application/xml
        - application/json
      parameters:
        - name: tanggal
          in: path
          description: tanggal for filtering
          required: true
          schema : 
            type: array
            items:
              type : string
          style: form
          explode: true
      responses:
        "200":
          description: successful operation
  "/v1/mom/karyawan/":
    get:
      tags:
        - Mom
      summary: Find karyawan 
      description: Returns karyawan 
      operationId: karyawan 
      produces:
        - application/xml
        - application/json
      responses:
        "200":
          description: successful operation
  "/v1/mom/issuesectionpeserta":  
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/createIssueSectionPeserta"
      tags:
        - Mom
      summary: create issue,section,peserta 
      description: create issue,section,peserta 
      operationId: create issue,section,peserta 
      produces:
        - application/xml
        - application/json
      responses:
        '200':
          description: successful operation
          schema:
            type: array
      security:
        - petstore_auth:
          - 'write:pets'
  "/v1/mom/updatemom/{id}":
    put:
      tags:
        - Mom
      summary: Change a Mom
      operationId: modifyMom
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        # - name: id_peserta
        #   in: path
        #   required: true
        #   schema:
        #     type: string
        # - name: id_issue
        #   in: path
        #   required: true
        #   schema:
        #     type: string
        # - name: id_section
        #   in: path
        #   required: true
        #   schema:
        #     type: string
        # - name: id_pic
        #   in: path
        #   required: true
        #   schema:
        #     type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/definitions/updatemom"
      responses:
        '200':
            description: successful operation
            schema:
              type: array
definitions:
  updatecatatan:  
    type: object
    required:
      - "id"
      - "catatan_rapat"
      - "start"
      - "deadline"
      - "status"
      - "remark"
      - "section"
      - "nrp"
      - "nama"
      - "jabatan"
    properties:
      catatan_rapat:
        type: string
        example: "Persiapan tower permanen 70m di pit cendana"
      start:
        type: string
        example: "2023-05-15"
      deadline:
        type: string
        example: "2023-05-25"
      status:
        type: "string"
        enum: ["Open","Closed","Progress","Pending","Cancel"]
        example: "Open"
      remark:
        type: string
        example: "PO di hold dari logistik"
      section:
        type: string
        example: "HCGA"
      pic:
          type: array
          properties: 
            nrp:
              type: string
            nama:
              type: string
            jabatan:
              type: string
          example:
            -
              nrp: "20000257"
              nama: "YOGA SETYA PUTRA"
              jabatan: "ACT. GROUP LEADER SYSTEM DEVELOPER"
            -
              nrp: "18125649"
              nama: "AAN ARDYANTORO"
              jabatan: "ACT. GROUP LEADER SYSTEM DEVELOPER"
  updatemom:
      type: object
      required:
        - "id"
        - "tema_rapat"
        - "tanggal"
        - "waktu"
        - "tempat"
      properties:
        id_mom:
          type: "char"
          format: "uuid"
          example: "3a81da44-6932-41ce-b1cc-53260d48fdc"
        tema_rapat:
          type: "string"
          example: "COE"
        tanggal:
          type: "date"
          example: "2023-05-09"
        waktu:
          type: string
          example: "09.00-10.00"
        tempat:
          type: string
          example: "Zoom Meeting"
        peserta:
          type: array
          properties:
            nrp:
              type: string
            nama:
              type: string
            jabatan:
              type: string
          example:
            -
              nrp: "22004393"
              nama: "Raihani Akmaliah"
              jabatan: "ICT"
        issue:
          type: array
          items:
            $ref: '#/definitions/updatecatatan'
components:
  schemas:
    CatatanSetting:
      type: object
      properties:
        catatan_rapat:
          type: string
          example: "Persiapan tower permanen 70m di pit cendana"
        start:
          type: string
          example: "2023-05-15"
        deadline:
          type: string
          example: "2023-05-25"
        status:
          type: "string"
          enum: ["Open","Closed","Progress","Pending","Cancel"]
          example: "Open"
        remark:
          type: string
          example: "PO di hold dari logistik"
        section:
          type: string
          example: "HCGA"
        pic:
          type: array
          properties: 
            nrp:
              type: string
            nama:
              type: string
            jabatan:
              type: string
          example:
            -
              nrp: "20000257"
              nama: "YOGA SETYA PUTRA"
              jabatan: "ACT. GROUP LEADER SYSTEM DEVELOPER"
            -
              nrp: "18125649"
              nama: "AAN ARDYANTORO"
              jabatan: "ACT. GROUP LEADER SYSTEM DEVELOPER"
    createIssueSectionPeserta:
      type: object
      properties:
        tema_rapat:
          type: "string"
          example: "COE"
        tanggal:
          type: "date"
          example: "2023-05-23"
        waktu:
          type: "string"
          example: "09:00-10:00"
        tempat:
          type: "string"
          example: "Zoom Meeting"
        peserta:
          type: array
          properties:
            nrp:
              type: string
            nama:
              type: string
            jabatan:
              type: string
          example:
            -
              nrp: "22004393"
              nama: "Raihani Akmaliah"
              jabatan: "ICT"
            -
              nrp: "22004090"
              nama: "Imam"
              jabatan: "PLDP ICT"
        listCatatan:
          type: array
          items:
            $ref: '#/components/schemas/CatatanSetting'
        
        
          
          
          
