Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Add AppBootVersion to 'app register' shell/client #5240

Merged
merged 4 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@
public enum AppBootSchemaVersion {

BOOT2("2"),
BOOT3( "3");
BOOT3("3");

private String bootVersion;

AppBootSchemaVersion(String bootVersion) {
this.bootVersion = bootVersion;
}

public static AppBootSchemaVersion defaultVersion() {
return BOOT2;
}

public static AppBootSchemaVersion fromBootVersion(String bootVersion) {
return Arrays.stream(AppBootSchemaVersion.values())
.filter((bv) -> bv.bootVersion.equals(bootVersion))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public List<AppRegistration> importAll(boolean overwrite, Resource... resources)
String[] typeName = lineSplit[0].split("\\.");
if (typeName.length < 2 || typeName.length > 3) {
throw new IllegalArgumentException("Invalid format for app key '" + lineSplit[0]
+ "'in file. Must be <type>.<name> or <type>.<name>.metadata or <type>.<name>.bootVersion");
+ "'in file. Must be <type>.<name> or <type>.<name>.metadata");
}
String type = typeName[0].trim();
String name = typeName[1].trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public void register(
public void register(
@PathVariable("type") ApplicationType type,
@PathVariable("name") String name,
@RequestParam(name = "boot-version", required = false) AppBootSchemaVersion bootVersion,
@RequestParam(name = "bootVersion", required = false) AppBootSchemaVersion bootVersion,
@RequestParam("uri") String uri,
@RequestParam(name = "metadata-uri", required = false) String metadataUri,
@RequestParam(value = "force", defaultValue = "false") boolean force) {
Expand Down