We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7dd4d7 commit 6d3a55aCopy full SHA for 6d3a55a
src/generator/serviceGenarator.ts
@@ -966,10 +966,8 @@ export default class ServiceGenerator {
966
isAnonymous: false,
967
};
968
969
- // 具名 body 场景
970
- if (isReferenceObject(schema)) {
971
- bodySchema.type = `${bodySchema.type}`;
972
- } else {
+ // 匿名 body 场景
+ if (!isReferenceObject(schema)) {
973
bodySchema.isAnonymous = true;
974
}
975
@@ -1070,7 +1068,7 @@ export default class ServiceGenerator {
1070
1068
DEFAULT_SCHEMA) as SchemaObject;
1071
1069
1072
1073
- responseSchema.type = `${this.getType(schema, this.config.namespace)}`;
+ responseSchema.type = this.getType(schema, this.config.namespace);
1074
1075
return responseSchema;
1076
0 commit comments