Skip to content

Commit

Permalink
Make name required, update Swagger examples
Browse files Browse the repository at this point in the history
  • Loading branch information
anotheroneofthese committed Oct 1, 2024
1 parent cc1daeb commit 897b441
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ import org.springframework.web.server.ServerWebInputException
"owner": "NB",
"receiver": {
"name": "Doug Dimmadome",
"location": "Doug Dimmadome's office in the Dimmsdale Dimmadome",
"address": "Dimmsdale Dimmadome",
"city": "Dimmsdale",
"postalCode": "69-420",
"phoneNum": "+47 666 69 420"
"address": "Dimmsdale Dimmadome, 21st Ave. Texas"
},
"callbackUrl": "https://example.com/send/callback/here"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ import kotlin.jvm.Throws
"orderType": "LOAN",
"receiver": {
"name": "Doug Dimmadome",
"location": "Doug Dimmadome's office in the Dimmsdale Dimmadome",
"address": "Dimmsdale Dimmadome",
"city": "Dimmsdale",
"postalCode": "69-420",
"phoneNum": "+47 666 69 420"
"address": "Dimmsdale Dimmadome, 21st Ave. Texas"
},
"callbackUrl": "https://example.com/send/callback/here"
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/no/nb/mlt/wls/domain/model/Order.kt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ data class Order(

data class Receiver(
val name: String,
val address: String
val address: String?
)

enum class Status {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ data class SynqOrderPayload(
val priority: Int,
val owner: SynqOwner,
val orderLine: List<OrderLine>,
@JsonInclude(JsonInclude.Include.NON_NULL)
val shippingAddress: ShippingAddress? = null
val shippingAddress: ShippingAddress
) {
data class OrderLine(
@Min(1)
Expand All @@ -46,8 +45,7 @@ data class ShippingAddress(
val address: Address?
) {
data class Address(
@JsonInclude(JsonInclude.Include.NON_NULL)
val contactPerson: String? = null,
val contactPerson: String,
@JsonInclude(JsonInclude.Include.NON_NULL)
val addressLine1: String? = null
)
Expand Down

0 comments on commit 897b441

Please sign in to comment.