Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element Template generation: set notEmpty: false explicitly #2675

Merged
merged 2 commits into from
May 29, 2024

Conversation

jonathanlukas
Copy link
Contributor

Description

On template generation, there seems to be no way to have constraints.notEmpty being set to true.

However, this is currently required to achieve a field that has a regex for validation but may remain empty.

This PR enables this behaviour for template property fields and jakarta validation annotations on processing.

Related issues

camunda/camunda-modeler#4314 (comment)

closes #

@jonathanlukas jonathanlukas self-assigned this May 28, 2024
@jonathanlukas jonathanlukas requested a review from a team as a code owner May 28, 2024 08:46
sbuettner
sbuettner previously approved these changes May 28, 2024
@jonathanlukas
Copy link
Contributor Author

@sbuettner could this be regarded as a bugfix and be backported to 8.5?

@sbuettner
Copy link
Contributor

@jonathanlukas Yes, sure

@sbuettner sbuettner force-pushed the allow-not-empty-false branch from 21ffef8 to f878bf5 Compare May 29, 2024 08:17
@sbuettner sbuettner disabled auto-merge May 29, 2024 08:17
@sbuettner sbuettner added this pull request to the merge queue May 29, 2024
Merged via the queue into main with commit 69eb232 May 29, 2024
4 checks passed
@sbuettner sbuettner deleted the allow-not-empty-false branch May 29, 2024 14:22
Copy link
Contributor

Backport failed for release/8.5, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release/8.5
git worktree add -d .worktree/backport-2675-to-release/8.5 origin/release/8.5
cd .worktree/backport-2675-to-release/8.5
git switch --create backport-2675-to-release/8.5
git cherry-pick -x 69eb232fa1bb51d005ce9462145f9e5c03a73bad

jonathanlukas added a commit that referenced this pull request Jun 3, 2024
* set notEmpty: false explicitly

* added tests

(cherry picked from commit 69eb232)

# Conflicts:
#	element-template-generator/core/src/main/java/io/camunda/connector/generator/java/processor/FieldProcessor.java
#	element-template-generator/core/src/main/java/io/camunda/connector/generator/java/processor/TemplatePropertyFieldProcessor.java
#	element-template-generator/core/src/test/java/io/camunda/connector/generator/java/example/outbound/MyConnectorInput.java
jonathanlukas added a commit that referenced this pull request Jun 3, 2024
…2690)

* Element Template generation: set notEmpty: false explicitly (#2675)

* set notEmpty: false explicitly

* added tests

(cherry picked from commit 69eb232)

# Conflicts:
#	element-template-generator/core/src/main/java/io/camunda/connector/generator/java/processor/FieldProcessor.java
#	element-template-generator/core/src/main/java/io/camunda/connector/generator/java/processor/TemplatePropertyFieldProcessor.java
#	element-template-generator/core/src/test/java/io/camunda/connector/generator/java/example/outbound/MyConnectorInput.java

* revert some changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants