Skip to content

Commit

Permalink
OpenAPI should have an "array of string" schema for "include" and "e…
Browse files Browse the repository at this point in the history
…xclude" #673
  • Loading branch information
andrus committed May 20, 2024
1 parent 0673dbf commit 7e61705
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* #659 Idempotent DELETE by ids, optimizing performance
* #660 Builders: auto-detect multi-column IDs
* #662 Update expression parser with JavaCC 7.0.13
* #673 OpenAPI should have an "array of string" schema for "include" and "exclude"

## Release 5.0.M19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.agrest.protocol.Direction;
import io.swagger.v3.jaxrs2.ResolvedParameter;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.media.StringSchema;
import io.swagger.v3.oas.models.parameters.Parameter;
Expand Down Expand Up @@ -81,12 +82,11 @@ public ResolvedParameter resolve() {
}

protected Parameter createIncludeParam() {
// TODO: detailed schema
return queryParam(ControlParams.include);
return queryParam(ControlParams.include).schema(new ArraySchema().items(new StringSchema()));
}

protected Parameter createExcludeParam() {
return queryParam(ControlParams.exclude);
return queryParam(ControlParams.exclude).schema(new ArraySchema().items(new StringSchema()));
}

protected Parameter createSortParam() {
Expand Down

0 comments on commit 7e61705

Please sign in to comment.