cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Not quite correct/complete documentation

Not quite correct/complete documentation

cdutz
Long-established Member

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?

3 REPLIES 3

Sgilk
Contributor

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?

cdutz
Long-established Member

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. 

nickH
Community Moderator
Community Moderator

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 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist