Leo1 penalty API

The penalty API from Leo1 — 1 operation(s) for penalty.

OpenAPI Specification

leo1-penalty-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: leofees_backend api penalty API
  version: version
  description: General system endpoints for the API.
tags:
- name: penalty
paths:
  /api/v1/penalty/:
    get:
      tags:
      - penalty
      summary: Get Student Penalties
      operationId: get_student_penalties_api_v1_penalty__get
      parameters:
      - required: true
        schema:
          title: Student Ids
          type: string
        name: student_ids
        in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
    put:
      tags:
      - penalty
      summary: Update Student Penalty
      operationId: update_student_penalty_api_v1_penalty__put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStudentPenaltyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
    post:
      tags:
      - penalty
      summary: Create Student Penalty
      operationId: create_student_penalty_api_v1_penalty__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStudentPenaltyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
    delete:
      tags:
      - penalty
      summary: Delete Student Penalty
      operationId: delete_student_penalty_api_v1_penalty__delete
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteStudentPenaltyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - APIKeyHeader: []
components:
  schemas:
    CreateStudentPenaltyRequest:
      title: CreateStudentPenaltyRequest
      required:
      - student_id
      - amount
      type: object
      properties:
        student_id:
          title: Student Id
          type: integer
          description: Student ID is required
        amount:
          title: Amount
          type: number
          description: Amount is required
        type:
          title: Type
          type: string
          description: type is optional
        remarks:
          title: Remarks
          type: string
          description: Remarks is optional
    ValidationError:
      title: ValidationError
      required:
      - loc
      - msg
      - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    UpdateStudentPenaltyRequest:
      title: UpdateStudentPenaltyRequest
      required:
      - student_penalty_id
      - student_id
      type: object
      properties:
        student_penalty_id:
          title: Student Penalty Id
          type: integer
          description: Student Refund ID is required
        student_id:
          title: Student Id
          type: integer
          description: Student ID is required
        amount:
          title: Amount
          type: number
          description: Amount is optional
        type:
          title: Type
          type: string
          description: Type is optional
        remarks:
          title: Remarks
          type: string
          description: Remarks is optional
    DeleteStudentPenaltyRequest:
      title: DeleteStudentPenaltyRequest
      required:
      - student_id
      - student_penalty_ids
      type: object
      properties:
        student_id:
          title: Student Id
          type: integer
          description: Student ID is required
        student_penalty_ids:
          title: Student Penalty Ids
          type: array
          items:
            type: integer
          description: Student Penalty IDs are required
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: secret-key