Update object definitions in list and map
This commit is contained in:
@@ -82,9 +82,27 @@ export class ProtoDefinitionService {
|
||||
.map((messageObject) => messageObject as ProtoMessage);
|
||||
for (const messageObject of standardMessages) {
|
||||
for (const value of messageObject.values) {
|
||||
let configuration: MessageConfiguration | null = null;
|
||||
if (value.configuration.type === MessageTypeEnum.Object) {
|
||||
configuration = value.configuration;
|
||||
} else if (value.configuration.type === MessageTypeEnum.List) {
|
||||
const listConfiguration = value.configuration as ListMessage;
|
||||
if (
|
||||
listConfiguration.subConfiguration.type === MessageTypeEnum.Object
|
||||
) {
|
||||
configuration = listConfiguration.subConfiguration;
|
||||
}
|
||||
} else if (value.configuration.type === MessageTypeEnum.Map) {
|
||||
const listConfiguration = value.configuration as MapMessage;
|
||||
if (
|
||||
listConfiguration.valueConfiguration.type === MessageTypeEnum.Object
|
||||
) {
|
||||
configuration = listConfiguration.valueConfiguration;
|
||||
}
|
||||
}
|
||||
if (configuration) {
|
||||
this.populateNestedObject(
|
||||
value.configuration as ObjectMessage,
|
||||
configuration as ObjectMessage,
|
||||
messageObject.packageName!,
|
||||
standardMessages
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user