You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/10/26 09:46:45 UTC
[GitHub] [camel] lburgazzoli opened a new pull request #6341: CAMEL-17097: YAML DSL Camel Case
lburgazzoli opened a new pull request #6341:
URL: https://github.com/apache/camel/pull/6341
- CAMEL-17097: YAML DSL Camel Case
- yaml-dsl fix SagaTest
<!-- Uncomment and fill this section if your PR is not trivial
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
Below are the contribution guidelines:
https://github.com/apache/camel/blob/main/CONTRIBUTING.md
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] lburgazzoli commented on a change in pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on a change in pull request #6341:
URL: https://github.com/apache/camel/pull/6341#discussion_r736401424
##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/SagaTest.groovy
##########
@@ -40,7 +40,13 @@ class SagaTest extends YamlTestSupport {
with(completion, SagaActionUriDefinition) {
uri == "direct:completion"
}
+ // saga spans the entire route so steps are inserted before any saga specific step
+ // https://issues.apache.org/jira/browse/CAMEL-17129
with(outputs[0], ToDefinition) {
+ endpointUri == 'mock:result'
+ }
+ //
Review comment:
removed
##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
##########
@@ -648,10 +653,14 @@ private TypeSpecHolder generateParser(ClassInfo info) {
annotationValue(info, XML_ROOT_ELEMENT_ANNOTATION_CLASS, "name")
.map(AnnotationValue::asString)
.filter(value -> !"##default".equals(value))
- .map(StringHelper::camelCaseToDash)
- .ifPresent(v -> {
- yamlTypeAnnotation.addMember("nodes", "$S", v);
- TypeSpecHolder.put(attributes, "node", v);
+ .ifPresent(value -> {
+ if (!Objects.equals(value, StringHelper.camelCaseToDash(value))) {
Review comment:
comment added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] mgubaidullin commented on a change in pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
mgubaidullin commented on a change in pull request #6341:
URL: https://github.com/apache/camel/pull/6341#discussion_r738844853
##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/CircuitBreakerTest.groovy
##########
@@ -58,6 +58,40 @@ class CircuitBreakerTest extends YamlTestSupport {
}
}
}
+ def "circuit-breaker-camelCase"() {
+ when:
+ loadRoutes '''
+ - from:
+ uri: "direct:start"
+ steps:
+ - circuitBreaker:
+ steps:
+ - log: "test"
+ configurationRef: "my-config"
+ resilience4jConfiguration:
+ failureRateThreshold: 10
+ on-fallback:
Review comment:
on-fallback should be also camel case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] mgubaidullin commented on pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
mgubaidullin commented on pull request #6341:
URL: https://github.com/apache/camel/pull/6341#issuecomment-954302264
@lburgazzoli Karavan UI: models and api generator works fine with new JSON schema.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on a change in pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
davsclaus commented on a change in pull request #6341:
URL: https://github.com/apache/camel/pull/6341#discussion_r736395807
##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/SagaTest.groovy
##########
@@ -40,7 +40,13 @@ class SagaTest extends YamlTestSupport {
with(completion, SagaActionUriDefinition) {
uri == "direct:completion"
}
+ // saga spans the entire route so steps are inserted before any saga specific step
+ // https://issues.apache.org/jira/browse/CAMEL-17129
with(outputs[0], ToDefinition) {
+ endpointUri == 'mock:result'
+ }
+ //
Review comment:
dangling comment
##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
##########
@@ -648,10 +653,14 @@ private TypeSpecHolder generateParser(ClassInfo info) {
annotationValue(info, XML_ROOT_ELEMENT_ANNOTATION_CLASS, "name")
.map(AnnotationValue::asString)
.filter(value -> !"##default".equals(value))
- .map(StringHelper::camelCaseToDash)
- .ifPresent(v -> {
- yamlTypeAnnotation.addMember("nodes", "$S", v);
- TypeSpecHolder.put(attributes, "node", v);
+ .ifPresent(value -> {
+ if (!Objects.equals(value, StringHelper.camelCaseToDash(value))) {
Review comment:
Is this the "magic place" where the generated DSL would now have both kebab and camel case? If so can we maybe add a code comment so we wont forget about this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] lburgazzoli commented on pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on pull request #6341:
URL: https://github.com/apache/camel/pull/6341#issuecomment-951773535
@mgubaidullin @davsclaus
This is a first iteration about supporting camel case in the YAML DSL (https://issues.apache.org/jira/browse/CAMEL-17097).
The JSON schema has not yet been fully adapted as we can't have both the style co-existing as it would not work for required fields (you can't require both the camel case and the kebab one)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] lburgazzoli commented on pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on pull request #6341:
URL: https://github.com/apache/camel/pull/6341#issuecomment-952054039
@mgubaidullin mind testing this PR ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] lburgazzoli merged pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
lburgazzoli merged pull request #6341:
URL: https://github.com/apache/camel/pull/6341
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] lburgazzoli edited a comment on pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on pull request #6341:
URL: https://github.com/apache/camel/pull/6341#issuecomment-951773535
@mgubaidullin @davsclaus
This is a first iteration about supporting camel case in the YAML DSL (https://issues.apache.org/jira/browse/CAMEL-17097).
The JSON schema has not yet been fully adapted as we can't have both styles co-existing as it would not work for required fields (you can't require both the camel case and the kebab one)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] lburgazzoli commented on a change in pull request #6341: CAMEL-17097: YAML DSL Camel Case
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on a change in pull request #6341:
URL: https://github.com/apache/camel/pull/6341#discussion_r738991854
##########
File path: dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/CircuitBreakerTest.groovy
##########
@@ -58,6 +58,40 @@ class CircuitBreakerTest extends YamlTestSupport {
}
}
}
+ def "circuit-breaker-camelCase"() {
+ when:
+ loadRoutes '''
+ - from:
+ uri: "direct:start"
+ steps:
+ - circuitBreaker:
+ steps:
+ - log: "test"
+ configurationRef: "my-config"
+ resilience4jConfiguration:
+ failureRateThreshold: 10
+ on-fallback:
Review comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org