Add ability to skip role creation on scope create (#308)

* Initial work on scope creation skipping

* Fix things
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-08-26 23:27:25 -04:00
1 parent e4da5e9ab5
commit 490be8a7e4
27 files changed
+962 -304

No files matched your search

+15 -1
View File
@@ -26,6 +26,7 @@ type fieldInfo struct {
FieldType string
GenerateSdkOption bool
SubtypeName string
Query bool
}
type structInfo struct {
@@ -66,6 +67,11 @@ type structInfo struct {
// typeOnCreate indicates that create will be creating a concrete
// implementation of an abstract type and thus a type field is necessary
typeOnCreate bool
// extraOptions allows specifying extra options that will be created for a
// given type, e.g. arguments only valid for one call or purpose and not
// conveyed within the item itself
extraOptions []fieldInfo
}
var inputStructs = []*structInfo{
@@ -101,7 +107,15 @@ var inputStructs = []*structInfo{
deleteTemplate,
listTemplate,
},
pathArgs: []string{"scope"},
pathArgs: []string{"scope"},
extraOptions: []fieldInfo{
{
Name: "SkipRoleCreation",
ProtoName: "skip_role_creation",
FieldType: "bool",
Query: true,
},
},
versionEnabled: true,
},
// User related resources