You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/06/09 19:54:51 UTC
[PR] CAMEL-23724: Add operators section to Simple language catalog [camel]
davsclaus opened a new pull request, #23893:
URL: https://github.com/apache/camel/pull/23893
## Summary
- Extends the Simple language JSON catalog (`simple.json`) with a machine-readable `"operators"` section documenting all 32 operators
- Each operator entry includes: description, kind (binary/unary/logical/ternary/chain/other), syntax pattern, precedence, and usage examples
- Follows the same `@Metadata` annotation → `PackageLanguageMojo` → `LanguageModel` → `JsonMapper` pipeline used for functions
This gives AIs and other tools a structured contract to understand the Simple expression language operators — what they mean, how they're used, and their evaluation order.
## Changes
| File | What |
|------|------|
| `spi-annotations/Language.java` | Added `operatorsClass()` attribute |
| `LanguageModel.java` | Added `LanguageOperatorModel` inner class and `operators` list |
| `JsonMapper.java` | Serialize/deserialize operators section |
| `SimpleOperatorConstants.java` (new) | Source-of-truth for all 32 operators with `@Metadata` |
| `SimpleLanguage.java` | Wired `operatorsClass = SimpleOperatorConstants.class` |
| `PackageLanguageMojo.java` | Added `addOperator()` method and processing block |
| `simple.json` (generated) | Now contains the `"operators"` section |
## Test plan
- [x] `tooling/camel-tooling-model` tests pass (JSON round-trip)
- [x] `core/camel-core-languages` builds and regenerates `simple.json` with all 32 operators
- [ ] CI green
_Claude Code on behalf of Claus Ibsen_
--
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
Re: [PR] CAMEL-23724: Machine-readable grammar for Simple language with JS validator [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23893:
URL: https://github.com/apache/camel/pull/23893#issuecomment-4663990009
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `catalog/camel-catalog`
- `core/camel-api`
- `core/camel-core-languages`
- `dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin`
- `tooling/camel-tooling-model`
- `tooling/maven/camel-package-maven-plugin`
- `tooling/spi-annotations`
> :information_source: Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the `test-dependents` label to force testing all dependents.
<details><summary>Build reactor — dependencies compiled but only changed modules were tested (7 modules)</summary>
- Camel :: API
- Camel :: Catalog :: Camel Catalog
- Camel :: Core Languages
- Camel :: Maven Plugins :: Camel Maven Package
- Camel :: SPI Annotations
- Camel :: Tooling :: Model
- Camel :: YAML DSL :: Maven Plugins
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/27234757991)
--
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
Re: [PR] CAMEL-23724: Machine-readable grammar for Simple language with JS validator [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #23893:
URL: https://github.com/apache/camel/pull/23893
--
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
Re: [PR] CAMEL-23724: Add operators section to Simple language catalog [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23893:
URL: https://github.com/apache/camel/pull/23893#issuecomment-4663492548
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
* You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
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
Re: [PR] CAMEL-23724: Machine-readable grammar for Simple language with JS validator [camel]
Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway commented on PR #23893:
URL: https://github.com/apache/camel/pull/23893#issuecomment-4668067653
@davsclaus great idea providing documentation about the new simple language features (the LLM are not aware of all the great additions you added lately), I was wondering how is the html/js supposed to work:
- what's the mantainince burden? when adding a new simple function for example
- how can user use that?
oh, like this
```
=== Usage in a browser
Extract `camel-simple-validator.html` from the JAR and open it in a browser.
It provides an interactive form where you can type Simple expressions and validate them with instant feedback.
```
Maybe I am particularly lazy, but I do not see myself using this feature like this, I would like to use it, I think it makes sense, but it should be easier
- do you think it would be possible/worth to add the simple validator to the camel website?
--
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