code: func GetRoleSchema(version string, extensionSchema string) string {
  	schemaDefinitions := "," + RoleSpecV3SchemaDefinitions
  	if version == V2 {
  		schemaDefinitions = DefaultDefinitions
  	}
  
  	schemaTemplate := RoleSpecV3SchemaTemplate
  	if version == V2 {
  		schemaTemplate = RoleSpecV2SchemaTemplate
  	}
  
  	schema := fmt.Sprintf(schemaTemplate, ``)
  	if extensionSchema != "" {
  		schema = fmt.Sprintf(schemaTemplate, ","+extensionSchema)
  	}
  
  	return fmt.Sprintf(V2SchemaTemplate, MetadataSchema, schema, schemaDefinitions)
  }
docs: // GetRoleSchema returns role schema for the version requested with optionally
  // injected schema for extensions.