@@ -17,42 +17,48 @@ var describeCmd = &cobra.Command{
1717 Long : `Describe an element from a Mendix project in MDL syntax.
1818
1919Types:
20+ module Describe a module (all contents)
2021 entity Describe an entity
2122 externalentity Describe an external entity (alias for entity)
2223 association Describe an association
2324 enumeration Describe an enumeration
2425 constant Describe a constant
2526 microflow Describe a microflow
27+ nanoflow Describe a nanoflow
2628 workflow Describe a workflow
2729 page Describe a page
2830 snippet Describe a snippet
2931 layout Describe a layout
3032 javaaction Describe a java action
33+ jsonstructure Describe a JSON structure (also: "json structure")
34+ importmapping Describe an import mapping (also: "import mapping")
35+ exportmapping Describe an export mapping (also: "export mapping")
36+ restclient Describe a consumed REST service (also: "rest client")
3137 odataclient Describe a consumed OData service
3238 odataservice Describe a published OData service
39+ imagecollection Describe an image collection (also: "image collection")
3340 businesseventservice Describe a business event service (also: "business event service")
41+ databaseconnection Describe a database connection (also: "database connection")
3442 modulerole Describe a module role
3543 userrole Describe a user role
3644 projectsecurity Show project security settings
45+ settings Describe project settings
3746 demouser Describe a demo user
3847 navigation Describe a navigation profile
3948 systemoverview Module dependency graph (requires --format elk)
4049
4150Example:
51+ mxcli describe -p app.mpr module MyModule
4252 mxcli describe -p app.mpr entity MyModule.Customer
4353 mxcli describe -p app.mpr microflow MyModule.ProcessOrder
44- mxcli describe -p app.mpr workflow MyModule.MyWorkflow
54+ mxcli describe -p app.mpr nanoflow MyModule.ValidateInput
55+ mxcli describe -p app.mpr page MyModule.Customer_Overview
56+ mxcli describe -p app.mpr json structure MyModule.CustomerResponse
57+ mxcli describe -p app.mpr import mapping MyModule.IMM_Customer
58+ mxcli describe -p app.mpr export mapping MyModule.EMM_Customer
59+ mxcli describe -p app.mpr rest client MyModule.PetStoreAPI
60+ mxcli describe -p app.mpr settings Settings
4561 mxcli describe -p app.mpr navigation Responsive
46- mxcli describe -p app.mpr layout Atlas_Core.PopupLayout
47- mxcli describe -p app.mpr javaaction MyModule.MyAction
48- mxcli describe -p app.mpr odataclient MyModule.ExternalAPI
49- mxcli describe -p app.mpr odataservice MyModule.CustomerAPI
50- mxcli describe -p app.mpr businesseventservice MyModule.CustomerEventsApi
51- mxcli describe -p app.mpr business event service MyModule.CustomerEventsApi
52- mxcli describe -p app.mpr constant MyModule.BaseUrl
53- mxcli describe -p app.mpr modulerole MyModule.User
54- mxcli describe -p app.mpr userrole Administrator
55- mxcli describe -p app.mpr projectsecurity ProjectSecurity
5662 mxcli describe -p app.mpr --format elk systemoverview SystemOverview
5763` ,
5864 Args : cobra .MinimumNArgs (2 ),
@@ -70,6 +76,8 @@ Example:
7076
7177 var mdlCmd string
7278 switch objectType {
79+ case "MODULE" :
80+ mdlCmd = fmt .Sprintf ("DESCRIBE MODULE %s" , name )
7381 case "ENTITY" :
7482 mdlCmd = fmt .Sprintf ("DESCRIBE ENTITY %s" , name )
7583 case "ASSOCIATION" :
@@ -78,6 +86,8 @@ Example:
7886 mdlCmd = fmt .Sprintf ("DESCRIBE ENUMERATION %s" , name )
7987 case "MICROFLOW" :
8088 mdlCmd = fmt .Sprintf ("DESCRIBE MICROFLOW %s" , name )
89+ case "NANOFLOW" :
90+ mdlCmd = fmt .Sprintf ("DESCRIBE NANOFLOW %s" , name )
8191 case "WORKFLOW" :
8292 mdlCmd = fmt .Sprintf ("DESCRIBE WORKFLOW %s" , name )
8393 case "PAGE" :
@@ -92,16 +102,28 @@ Example:
92102 mdlCmd = fmt .Sprintf ("DESCRIBE USER ROLE '%s'" , name )
93103 case "PROJECTSECURITY" , "PROJECT SECURITY" :
94104 mdlCmd = "SHOW PROJECT SECURITY"
105+ case "SETTINGS" :
106+ mdlCmd = "DESCRIBE SETTINGS"
95107 case "DEMOUSER" , "DEMO USER" :
96108 mdlCmd = fmt .Sprintf ("DESCRIBE DEMO USER '%s'" , name )
97109 case "JAVAACTION" , "JAVA ACTION" :
98110 mdlCmd = fmt .Sprintf ("DESCRIBE JAVA ACTION %s" , name )
99111 case "CONSTANT" :
100112 mdlCmd = fmt .Sprintf ("DESCRIBE CONSTANT %s" , name )
113+ case "JSONSTRUCTURE" , "JSON STRUCTURE" :
114+ mdlCmd = fmt .Sprintf ("DESCRIBE JSON STRUCTURE %s" , name )
115+ case "IMPORTMAPPING" , "IMPORT MAPPING" :
116+ mdlCmd = fmt .Sprintf ("DESCRIBE IMPORT MAPPING %s" , name )
117+ case "EXPORTMAPPING" , "EXPORT MAPPING" :
118+ mdlCmd = fmt .Sprintf ("DESCRIBE EXPORT MAPPING %s" , name )
119+ case "RESTCLIENT" , "REST CLIENT" :
120+ mdlCmd = fmt .Sprintf ("DESCRIBE REST CLIENT %s" , name )
101121 case "ODATACLIENT" , "ODATA CLIENT" :
102122 mdlCmd = fmt .Sprintf ("DESCRIBE ODATA CLIENT %s" , name )
103123 case "ODATASERVICE" , "ODATA SERVICE" :
104124 mdlCmd = fmt .Sprintf ("DESCRIBE ODATA SERVICE %s" , name )
125+ case "IMAGECOLLECTION" , "IMAGE COLLECTION" :
126+ mdlCmd = fmt .Sprintf ("DESCRIBE IMAGE COLLECTION %s" , name )
105127 case "BUSINESSEVENTSERVICE" , "BUSINESS EVENT SERVICE" :
106128 mdlCmd = fmt .Sprintf ("DESCRIBE BUSINESS EVENT SERVICE %s" , name )
107129 case "DATABASECONNECTION" , "DATABASE CONNECTION" :
@@ -116,8 +138,8 @@ Example:
116138 mdlCmd = "" // handled directly by format-specific path
117139 default :
118140 fmt .Fprintf (os .Stderr , "Unknown type: %s\n " , strings .Join (args [:len (args )- 1 ], " " ))
119- fmt .Fprintln (os .Stderr , "Valid types: entity, association, enumeration, constant, microflow, workflow, page, snippet, layout, javaaction, odataclient, odataservice, businesseventservice, databaseconnection, modulerole, userrole, projectsecurity, demouser, navigation, systemoverview" )
120- fmt .Fprintln (os .Stderr , "Multi-word types also accepted: business event service, odata service, java action, database connection , etc." )
141+ fmt .Fprintln (os .Stderr , "Valid types: module, entity, association, enumeration, constant, microflow, nanoflow, workflow, page, snippet, layout, javaaction, jsonstructure, importmapping, exportmapping, restclient, odataclient, odataservice, imagecollection, businesseventservice, databaseconnection, modulerole, userrole, projectsecurity, settings , demouser, navigation, systemoverview" )
142+ fmt .Fprintln (os .Stderr , "Multi-word types also accepted: json structure, import mapping, export mapping, rest client, image collection, business event service , etc." )
121143 os .Exit (1 )
122144 }
123145
0 commit comments