
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@eclipse-emfcloud/coffee-custom-validators-example
Advanced tools
Example custom validation plug-in for the Model Server.
This package provides an example of a validation provider plug-in for the Model Server.
It provides an implementation of a custom validation rule for the root Machine in a Coffee model that randomly reports a warning condition.
See the parent readme for details of how to set up and build the project.
For detailed instructions how to run the example server configuration that includes this plug-in example, see the Example Server readme.
There are a variety of tools available for ad hoc REST interactions with services such as the Model Server. A recommended option is the Postman application.
Start by fetching the current state of the model.
Send a GET request to
http://localhost:8082/api/v2/models?modeluri=SuperBrewer3000.coffee
The result should look something like this:
{
"type": "success",
"data": {
"$type": "http://www.eclipsesource.com/modelserver/example/coffeemodel#//Machine",
"$id": "/",
"children": [
{
"$type": "http://www.eclipsesource.com/modelserver/example/coffeemodel#//BrewingUnit",
"$id": "//@children.0"
},
{
"$type": "http://www.eclipsesource.com/modelserver/example/coffeemodel#//ControlUnit",
"$id": "//@children.1",
"processor": {
"$id": "//@children.1/@processor",
"clockSpeed": 5,
"numberOfCores": 10,
"socketconnectorType": "Z51",
"thermalDesignPower": 100
},
"display": {
"$id": "//@children.1/@display",
"width": 10,
"height": 20
}
}
],
"name": "Super Brewer 3000",
"workflows": [
// ... workflow model here ...
]
}
}
Now send a validation request to check the model against its intrinsic rules and also the custom validation rule provided by the example plug-in.
Send a GET request to
http://localhost:8082/api/v2/validation?modeluri=SuperBrewer3000.coffee
No body content is required.
The response may include a warning like the following:
{
"severity": 2,
"source": "@eclipse-emfcloud/coffee-custom-validators-example",
"code": 1,
"message": "This is a randomly occurring example diagnostic.",
"data": [0.7710443792767079],
"children": [],
"id": "//@children.1"
}
in which the data is a random number between 0 and 1 that decided whether to report the warning.
This plug-in provider is included in live model validation, also. So if there are any clients subscribed for live validation updates (which also may be accomplished via testing tools like Postman) then executing commands as described in the command providers example should sometimes include this example warning diagnostic in the validation broadcasts.
FAQs
Example custom validation plug-in for the Model Server.
The npm package @eclipse-emfcloud/coffee-custom-validators-example receives a total of 1 weekly downloads. As such, @eclipse-emfcloud/coffee-custom-validators-example popularity was classified as not popular.
We found that @eclipse-emfcloud/coffee-custom-validators-example demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.