Managed-App-Schema-Builder icon indicating copy to clipboard operation
Managed-App-Schema-Builder copied to clipboard

Add default to every key

Open talkingmoose opened this issue 1 year ago • 0 comments

Jamf manifests support the default keyword to pre-populate a setting. This is useful for displaying a default setting that and administrator can still change.

Here’s a basic property:

{
    "title": "Disk Manager (com.company.diskmanager)",
    "description": "Preference settings for the fictitious Disk Manager application. This manifest demonstrates different ways to format the appearance or value of properties as well as include useful options like infoText. Jamf Pro supports many but not all elements and options here: https://github.com/json-editor/json-editor.",
    "properties": {
         "diskCacheSize": {
            "title": "Disk Cache Size",
            "description": "SSet disk cache size, in bytes.",
            "property_order": 30,
            "type": "integer"
        }
    }
}

Here’s the same property with a default value of “25600".

{
    "title": "Disk Manager (com.company.diskmanager)",
    "description": "Preference settings for the fictitious Disk Manager application. This manifest demonstrates different ways to format the appearance or value of properties as well as include useful options like infoText. Jamf Pro supports many but not all elements and options here: https://github.com/json-editor/json-editor.",
    "properties": {
         "diskCacheSize": {
            "title": "Disk Cache Size",
            "description": "SSet disk cache size, in bytes.",
            "default": 25600,
            "property_order": 30,
            "type": "integer"
        }
    }
}

This change applies to all property types but will be different for boolean properties vs. fill-in-the-blank properties.

image

talkingmoose avatar Sep 07 '23 16:09 talkingmoose