@@ -86,6 +86,8 @@ data class ClientCodegenConfig(
86
86
val addMessageToErrors : Boolean = defaultAddMessageToErrors,
87
87
// TODO(EventStream): [CLEANUP] Remove this property when turning on Event Stream for all services
88
88
val eventStreamAllowList : Set <String > = defaultEventStreamAllowList,
89
+ // TODO(CrateReorganization): Remove this once we commit to the breaking change
90
+ val enableNewCrateOrganizationScheme : Boolean = defaultEnableNewCrateOrganizationScheme,
89
91
) : CoreCodegenConfig(
90
92
formatTimeoutSeconds, debugMode,
91
93
) {
@@ -94,6 +96,7 @@ data class ClientCodegenConfig(
94
96
private const val defaultIncludeFluentClient = true
95
97
private const val defaultAddMessageToErrors = true
96
98
private val defaultEventStreamAllowList: Set <String > = emptySet()
99
+ private const val defaultEnableNewCrateOrganizationScheme = false
97
100
98
101
fun fromCodegenConfigAndNode (coreCodegenConfig : CoreCodegenConfig , node : Optional <ObjectNode >) =
99
102
if (node.isPresent) {
@@ -106,12 +109,14 @@ data class ClientCodegenConfig(
106
109
renameExceptions = node.get().getBooleanMemberOrDefault(" renameErrors" , defaultRenameExceptions),
107
110
includeFluentClient = node.get().getBooleanMemberOrDefault(" includeFluentClient" , defaultIncludeFluentClient),
108
111
addMessageToErrors = node.get().getBooleanMemberOrDefault(" addMessageToErrors" , defaultAddMessageToErrors),
112
+ enableNewCrateOrganizationScheme = node.get().getBooleanMemberOrDefault(" enableNewCrateOrganizationScheme" , false ),
109
113
)
110
114
} else {
111
115
ClientCodegenConfig (
112
116
formatTimeoutSeconds = coreCodegenConfig.formatTimeoutSeconds,
113
117
debugMode = coreCodegenConfig.debugMode,
114
118
eventStreamAllowList = defaultEventStreamAllowList,
119
+ enableNewCrateOrganizationScheme = defaultEnableNewCrateOrganizationScheme,
115
120
)
116
121
}
117
122
}
0 commit comments