FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
01-24-2024 11:24 AM
Hi all,
so I've continued my work on ceating the TimechoDB app and am currently chewing through the package manifest stuff on: https://boschrexroth.github.io/ctrlx-automation-sdk/package-assets.html
One thing the documentantion doesn't really say is: What's the name of the package-manifest? I mean ... I can see it's JSON, so the file ending will probably be "{something}.json" ... from a look at the examples, I assume it's usually "{myappmanme}.package-manifest.json". But I guess it would be cool to mention the name of the file in that page.
Another thing is: I copied the example code and was quite happy to see it use JSON-Schema ... unfortunately IntelliJ started instantly yelling at me that my content is not valid:
- There is no "system" property defined
- Also there is no menus/overview/description tag defined
So my question now is:
- Is the documentation wrong?
- Is the JSON spec wrong?
Solved! Go to Solution.
01-24-2024 03:36 PM - edited 01-24-2024 04:00 PM
Hi @cdutz ,
I'm unfamiliar with the IntelliJ IDE, but the JSON spec is valid JSON and has been validated in providing configuration for the documented services. The entire schema is not necessary in each application. If you are using a subsection of the overall schema, and IntelliJ is checking against the full schema, that is probably the problem.
Which example code did you copy? If you copied this snippet below, I actually did find a small error. The lines indicated should be removed. The [...] is just indicating there may be additional JSON before and after the snippet. You can use a JSON Schema Validator tool to check your JSON against a schema.
{
"$schema": "https://json-schema.boschrexroth.com/ctrlx-automation/ctrlx-core/apps/package-manifest/package-manifest.v1.3.schema.json",
[...] ///////////////////////////////////////////////////////// REMOVE THIS
"menus": {
"sidebar": [
{
"id": "solutions",
"title": "Solutions",
"icon": "bosch-ic-solutions",
"permissions": [
"solutions.r",
"solutions.rw"
],
"items": [
{
"id": "solutions-activeconfiguration",
"title": "Active Configuration",
"link": "/solutions/activeconfiguration",
"permissions": [
"solutions.r",
"solutions.rw"
]
},
{
"id": "solutions-overview",
"title": "Solutions Overview",
"link": "/solutions/solutions",
"permissions": [
"solutions.r",
"solutions.rw"
]
}
]
}
],
"settings": [
{
"id": "solutions-settings",
"title": "Solution Settings",
"icon": "bosch-ic-gear",
"link": "/solutions/settings",
"permissions": [
"solutions.rw"
] //////////////////////////////////////////////////////// REMOVE THIS
}
],
"system": [
{
"id": "reboot",
"title": "Reboot",
"icon": "bosch-ic-gear",
"link": "/reboot-manager"
]
}
],
"overview": [
{
"id": "solutions-overview",
"title": "Solutions",
"description": "Manage solutions on the control",
"icon": "bosch-ic-solutions",
"link": "/solutions/activeconfiguration",
"permissions": [
"solutions.r",
"solutions.rw"
]
}
]
},
[...] ////////////////////////////////////////////////////// REMOVE THIS
}
Do you have any specific disagreements between the documentation and JSON spec?
01-24-2024 04:03 PM - edited 01-24-2024 04:04 PM
Well if you open the schema:
https://json-schema.boschrexroth.com/ctrlx-automation/ctrlx-core/apps/package-manifest/package-manifest.v1.3.schema.json
And simply search for "system" you will not find any definition of that property. Yes the word is referenced twice in some text, but there actually is no definition of "system".
Same if I have a look at the definition of the property "overview", I see that's of type "entry" and if I look at that, I can see all properties defined except the "description" element.
I did remove the lines you pointed out before reporting in my last email as it was obvious that these needed removal.
01-24-2024 04:42 PM - edited 01-24-2024 04:43 PM
Hi @cdutz
Thanks for reporting this bug! We forwarded the issue internally.
You can consider the schema as the correct source. The example needs to be updated. The "system" entry is a relic from previous versions.
Best regards,
Nick