Skip to content

Commit

Permalink
Merge pull request #421 from amvanbaren/bugfix/ignore-includeAllVersions
Browse files Browse the repository at this point in the history
Ignore includeAllVersions if extensionVersion is specified.
  • Loading branch information
amvanbaren authored Feb 15, 2022
2 parents decfa9a + dc419c0 commit 22c1f39
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public QueryResultJson query(QueryParamJson param) {
.map(e -> new AbstractMap.SimpleEntry<>(e.getKey(), toVersions(e.getValue())))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));

if(!param.includeAllVersions) {
if(Strings.isNullOrEmpty(param.extensionVersion) && !param.includeAllVersions) {
var latestIds = extensionVersions.stream()
.map(ExtensionVersionDTO::getExtension)
.map(ExtensionDTO::getLatestId)
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/org/eclipse/openvsx/RegistryAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public ResponseEntity<QueryResultJson> getQuery(
@ApiParam(value = "Universally unique identifier of a namespace", example = "1234")
String namespaceUuid,
@RequestParam(required = false)
@ApiParam(value = "Whether to include all versions of an extension")
@ApiParam(value = "Whether to include all versions of an extension, ignored if extensionVersion is specified")
boolean includeAllVersions
) {
var param = new QueryParamJson();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class QueryParamJson {
@ApiModelProperty("Universally unique identifier of a namespace")
public String namespaceUuid;

@ApiModelProperty("Whether to include all versions of an extension")
@ApiModelProperty("Whether to include all versions of an extension, ignored if extensionVersion is specified")
public boolean includeAllVersions;

}

0 comments on commit 22c1f39

Please sign in to comment.