Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin committed Oct 7, 2023
1 parent 5607d52 commit 48c827d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/openapi3/src/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,12 @@ function createOAPIEmitter(
case "declaration":
return { $ref: `#/components/schemas/${result.name}` };
case "circular":
reportDiagnostic(program, {
code: "inline-cycle",
format: { type: getOpenAPITypeName(program, type, typeNameOptions) },
target: type,
});
return {};
case "none":
return {};
}
Expand All @@ -858,6 +864,12 @@ function createOAPIEmitter(
case "declaration":
return result.value as any;
case "circular":
reportDiagnostic(program, {
code: "inline-cycle",
format: { type: getOpenAPITypeName(program, type, typeNameOptions) },
target: type,
});
return {};
case "none":
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/openapi3/src/schema-emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class OpenAPI3SchemaEmitter extends TypeEmitter<
// shorten type names by removing TypeSpec and service namespace
namespaceFilter(ns) {
const name = getNamespaceFullName(ns);
return name !== serviceNamespaceName; // TODO FIXME
return name !== serviceNamespaceName;
},
};
}
Expand Down

0 comments on commit 48c827d

Please sign in to comment.