Skip to content

Commit

Permalink
Serialization to openapi of org.springframework.data.domain.Sort is n…
Browse files Browse the repository at this point in the history
…ot done correctly. Fixes #2447
  • Loading branch information
bnasslahsen committed Feb 28, 2024
1 parent e893628 commit b88a3e4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
package org.springdoc.core.converters.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;

/**
* The type Sort response.
* @author bnasslahsen
*/
@ArraySchema(arraySchema = @Schema(implementation = SortObject.class))
public class SortObject {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,24 @@
"format": "int32"
},
"sort": {
"$ref": "#/components/schemas/SortObject"
},
"numberOfElements": {
"type": "integer",
"format": "int32"
},
"pageable": {
"$ref": "#/components/schemas/PageableObject"
"type": "array",
"items": {
"$ref": "#/components/schemas/SortObject"
}
},
"first": {
"type": "boolean"
},
"last": {
"type": "boolean"
},
"pageable": {
"$ref": "#/components/schemas/PageableObject"
},
"numberOfElements": {
"type": "integer",
"format": "int32"
},
"empty": {
"type": "boolean"
}
Expand All @@ -133,7 +136,16 @@
"format": "int64"
},
"sort": {
"$ref": "#/components/schemas/SortObject"
"type": "array",
"items": {
"$ref": "#/components/schemas/SortObject"
}
},
"paged": {
"type": "boolean"
},
"unpaged": {
"type": "boolean"
},
"pageNumber": {
"type": "integer",
Expand All @@ -142,12 +154,6 @@
"pageSize": {
"type": "integer",
"format": "int32"
},
"paged": {
"type": "boolean"
},
"unpaged": {
"type": "boolean"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@
"format": "int64"
},
"sort": {
"$ref": "#/components/schemas/SortObject"
"type": "array",
"items": {
"$ref": "#/components/schemas/SortObject"
}
},
"paged": {
"type": "boolean"
},
"unpaged": {
"type": "boolean"
},
"pageNumber": {
"type": "integer",
Expand All @@ -72,12 +81,6 @@
"pageSize": {
"type": "integer",
"format": "int32"
},
"paged": {
"type": "boolean"
},
"unpaged": {
"type": "boolean"
}
}
},
Expand Down

0 comments on commit b88a3e4

Please sign in to comment.