-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adding schema to request fields
- Loading branch information
1 parent
92bfb59
commit 86a3da6
Showing
41 changed files
with
351 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,5 @@ enum class ErrorType { | |
DOCTOR_NOT_FOUND, | ||
DOCKER_ALREADY_EXISTS, | ||
|
||
UNEXPECTED_ERROR | ||
, | ||
UNEXPECTED_ERROR, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/fiap/healthmed/driver/web/request/DoctorRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
package com.fiap.healthmed.driver.web.request | ||
|
||
import com.fiap.healthmed.domain.Doctor | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
import java.math.BigDecimal | ||
|
||
data class DoctorRequest( | ||
@Schema(description = "CRM", example = "123456") | ||
val crm: String, | ||
@Schema(description = "CPF", example = "28685216907") | ||
val document: String, | ||
@Schema(description = "Specialty", example = "Cardiologist") | ||
val specialty: String, | ||
@Schema(description = "Name", example = "John Doe") | ||
val name: String, | ||
@Schema(description = "Email", example = "[email protected]") | ||
val email: String, | ||
@Schema(description = "Phone number", example = "+5511999999999") | ||
val phoneNumber: String, | ||
@Schema(description = "Service ZIP code", example = "12345678") | ||
val serviceZipCode: String, | ||
@Schema(description = "Service address", example = "123, Main St.") | ||
val serviceAddress: String, | ||
@Schema(description = "Available times") | ||
val availableTimes: AvailableTimesRequest, | ||
@Schema(description = "Appointment price", example = "100.00") | ||
val appointmentPrice: BigDecimal, | ||
) | ||
|
||
|
7 changes: 6 additions & 1 deletion
7
src/main/kotlin/com/fiap/healthmed/driver/web/request/JustificationCancellationRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
package com.fiap.healthmed.driver.web.request | ||
|
||
data class JustificationCancellationRequest(val text: String) | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
data class JustificationCancellationRequest( | ||
@Schema(description = "Justification text", example = "I'm not feeling well") | ||
val text: String | ||
) |
7 changes: 6 additions & 1 deletion
7
src/main/kotlin/com/fiap/healthmed/driver/web/request/MedicalRecordContentRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
package com.fiap.healthmed.driver.web.request | ||
|
||
data class MedicalRecordContentRequest(val content: String) | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
data class MedicalRecordContentRequest( | ||
@Schema(description = "Medical record content", example = "Patient has a fever") | ||
val content: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
package com.fiap.healthmed.driver.web.request | ||
|
||
import com.fiap.healthmed.domain.Patient | ||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
data class PatientRequest( | ||
@Schema(description = "CPF", example = "12345678900") | ||
val document: String, | ||
@Schema(description = "Name", example = "Foo Bar") | ||
val name: String, | ||
@Schema(description = "Email", example = "[email protected]") | ||
val email: String, | ||
@Schema(description = "Phone number", example = "+5511999999999") | ||
val phoneNumber: String, | ||
@Schema(description = "ZIP code", example = "12345678") | ||
val zipCode: String, | ||
@Schema(description = "Address", example = "123, Main St.") | ||
val address: String | ||
) | ||
|
||
|
@@ -16,6 +23,6 @@ fun PatientRequest.toDomain(): Patient = Patient( | |
name = name, | ||
email = email, | ||
phoneNumber = phoneNumber, | ||
zipCode = zipCode, | ||
zipCode = zipCode, | ||
address = address | ||
) |
2 changes: 2 additions & 0 deletions
2
src/main/kotlin/com/fiap/healthmed/driver/web/request/TimeAndDateToScheduleRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package com.fiap.healthmed.driver.web.request | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
import java.time.LocalDateTime | ||
|
||
data class TimeAndDateToScheduleRequest( | ||
@Schema(description = "scheduleAt", example = "2022-12-31T23:59:59") | ||
val scheduleAt: LocalDateTime, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.