Skip to content

Commit

Permalink
Merge pull request #671 from bitgopatmcl/add-titles-to-components
Browse files Browse the repository at this point in the history
Add `title` to components in openapi-generator
  • Loading branch information
andrew-scott-fischer authored Feb 2, 2024
2 parents be80f8b + 39a7e8c commit be56b30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/openapi-generator/src/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@ export function convertRoutesToOpenAPI(
if (openapiSchema === undefined) {
return acc;
} else {
return { ...acc, [name]: openapiSchema };
return {
...acc,
[name]: {
title: name,
...openapiSchema,
},
};
}
},
{} as Record<string, OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject>,
Expand Down

0 comments on commit be56b30

Please sign in to comment.