Skip to content

Commit dcc048f

Browse files
committed
fixup
1 parent 8a99655 commit dcc048f

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.github/workflows/generate-and-publish-sdk-sources.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ on:
1212

1313
jobs:
1414
generate-and-publish-sources:
15-
uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-full-workflow.yaml@v20241013
15+
uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-full-workflow.yaml@nanssari/validations
1616
secrets: inherit
1717
with:
1818
name: xap
1919
version: ${{ inputs.version }}
2020
transformations: "--headers key --operationIdsToTags"
2121
repository: 'ExpediaGroup/xap-java-sdk'
2222
ref: ${{ github.head_ref || github.ref_name }}
23+
sdk_repo_ref: 'nanssari/validations'

customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-listings-operation-params/rooms.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
fun rooms(rooms: List<Room>) =
22
apply {
3+
if (rooms.size > 8) {
4+
throw PropertyConstraintViolationException(
5+
constraintViolations = listOf("rooms: size must be between 0 and 8")
6+
)
7+
}
8+
39
rooms.elementAtOrNull(0)?.let {
410
this.room1Adults = it.adults
511
this.room1ChildAges = it.childAges?.map { item -> item.toString() }

customizations/generator/openapi/src/main/resources/post-processor/assets/templates/get-lodging-quotes-operation-params/rooms.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
fun rooms(rooms: List<Room>) =
22
apply {
3+
if (rooms.size > 8) {
4+
throw PropertyConstraintViolationException(
5+
constraintViolations = listOf("rooms: size must be between 0 and 8")
6+
)
7+
}
8+
39
rooms.elementAtOrNull(0)?.let {
410
this.room1Adults = it.adults
511
this.room1ChildAges = it.childAges?.map { item -> item.toString() }

0 commit comments

Comments
 (0)