Skip to content

Conversation

@czyz-bartosz
Copy link
Member

No description provided.

@czyz-bartosz czyz-bartosz force-pushed the v3_CASL-1159_naksha-cli-generating-storage-config-validation branch from 4ce2c7c to 2151776 Compare September 1, 2025 06:07
import java.util.List;

@FunctionalInterface
public interface Validator<T, S> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's T and S? some doc would be nice


@Override
@NotNull
protected PlatformMap createData() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For initial data population - use onCreation rather than createData

);
}
validateFields(map);
super.bind(data, symbol);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think bind is the best place to perform validation. This adds on behavior that this method was not responsible for.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it would be best to keep Proxy-related logic unaware of validation and vice-versa. So that we don't rely on Proxy lifecycle methods.
One potential solution is client-side validation where we pass the validated object as parameter

@czyz-bartosz czyz-bartosz added the Draft PR Work in progress do not merge label Sep 1, 2025
Signed-off-by: Bartosz Czyż <[email protected]>

# Conflicts:
#	here-naksha-cli/src/jvmMain/java/com/here/naksha/cli/copy/CopyCommand.java
#	here-naksha-cli/src/jvmMain/java/com/here/naksha/cli/copy/service/CopyService.java
#	here-naksha-cli/src/jvmTest/java/com/here/naksha/cli/copy/CopyCliTest.java
@czyz-bartosz czyz-bartosz force-pushed the v3_CASL-1159_naksha-cli-generating-storage-config-validation branch from 2151776 to 951145d Compare September 3, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI Draft PR Work in progress do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants