Skip to content

Commit ef75193

Browse files
fix: fix anonymous response generate error
1 parent 23a7c2a commit ef75193

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/generator/serviceGenarator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,8 @@ export default class ServiceGenerator {
10431043
}
10441044

10451045
responseSchema.type = `${this.config.namespace}.${this.getType(schema, this.config.namespace)}`;
1046+
1047+
return responseSchema;
10461048
}
10471049

10481050
if (isSchemaObject(schema)) {
@@ -1051,9 +1053,10 @@ export default class ServiceGenerator {
10511053
schema.required?.includes(fieldName) ?? false;
10521054
});
10531055
responseSchema.isAnonymous = true;
1054-
responseSchema.type = this.getType(schema, this.config.namespace);
10551056
}
10561057

1058+
responseSchema.type = this.getType(schema, this.config.namespace);
1059+
10571060
return responseSchema;
10581061
}
10591062

0 commit comments

Comments
 (0)