Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.28 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.28 KB

Job Data Repository

Requirements

  • Java 17

Main Class

io.github.battorydev.springboot.demo.DemoApplication

REST Endpoint

GET /job_data

Returns all job data.

Request Parameter

  • field - specify the fields to return.
    Filterable column: job title, salary, gender

  • condition - apply query condition. Filterable field and operation:

    • title operand: =
    • salary operand: =, >=, >, <=, <
    • gender operand: =
  • sort - field to sort. Sortable fields: title, salary

  • sort_type - Sort order. ASC (default) or DESC

Sample URL request

Documentation (Swagger)

http://localhost:8080/swagger-ui/index.html

Test Cases

  • JobDataControllerTests#givenTitleAndSalaryField_whenGetJobData_showTitleAndSalaryOnly
  • JobDataControllerTests#givenConditionSalaryGraterThan_whenGetJobData_returnJobSalaryGreaterThan
  • JobDataControllerTests#givenSortAndSortType_whenGetJobData_returnSortedData