Skip to content

Commit

Permalink
Simplify map notation in gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
andriy-dmytruk committed Jun 29, 2023
1 parent 6231148 commit 11062ab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test-suite-server-generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ tasks.named("generateOpenApi") {
outputKinds = ["models", "apis", "supportingFiles"]
parameterMappings = [
// Pageable parameter
["name": "page", "location": "QUERY", "mappedType": "io.micronaut.data.model.Pageable"],
["name": "size", "location": "QUERY", "mappedType": "io.micronaut.data.model.Pageable"],
["name": "sortOrder", "location": "QUERY", "mappedType": "io.micronaut.data.model.Pageable"],
[name: "page", location: "QUERY", mappedType: "io.micronaut.data.model.Pageable"],
[name: "size", location: "QUERY", mappedType: "io.micronaut.data.model.Pageable"],
[name: "sortOrder", location: "QUERY", mappedType: "io.micronaut.data.model.Pageable"],
// Ignored header
["name": "ignored-header", "location": "HEADER"],
[name: "ignored-header", location: "HEADER"],
// Custom filtering header
["name": "Filter", "location": "HEADER", "mappedType": "io.micronaut.openapi.test.filter.MyFilter"]
[name: "Filter", location: "HEADER", mappedType: "io.micronaut.openapi.test.filter.MyFilter"]
]
responseBodyMappings = [
// Response with Last-Modified header mapping
["headerName": "Last-Modified", "mappedBodyType": "io.micronaut.openapi.test.dated.DatedResponse"],
[headerName: "Last-Modified", mappedBodyType: "io.micronaut.openapi.test.dated.DatedResponse"],
// Response with Page body
["headerName": "X-Page-Number", "mappedBodyType": "io.micronaut.data.model.Page", "isListWrapper": true]
[headerName: "X-Page-Number", mappedBodyType: "io.micronaut.data.model.Page", isListWrapper: true]
]
}

0 comments on commit 11062ab

Please sign in to comment.