Skip to content

Commit a1d64c5

Browse files
1 parent 3ffb475 commit a1d64c5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/transform/operation-object.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function transformOperationObject(
5656
allParamsOptional = false;
5757
}
5858
const c = getSchemaObjectComment(p, indentLv);
59-
if (c) parameterOutput.push(indent(c, indentLv));
59+
if (c) inlineOutput.push(indent(c, indentLv));
6060
const parameterType = transformParameterObject(p, {
6161
path: `${path}/parameters/${p.name}`,
6262
ctx: { ...ctx, indentLv },

test/paths-object.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("Paths Object", () => {
2222
"/api/v1/user/{user_id}": {
2323
parameters: [{ name: "page", in: "query", schema: { type: "number" }, description: "Page number." }],
2424
get: {
25-
parameters: [{ name: "user_id", in: "path" }],
25+
parameters: [{ name: "user_id", in: "path", description: "User ID." }],
2626
responses: {
2727
200: {
2828
description: "OK",
@@ -58,6 +58,7 @@ describe("Paths Object", () => {
5858
get: {
5959
parameters: {
6060
path: {
61+
/** @description User ID. */
6162
user_id: string;
6263
};
6364
};
@@ -79,8 +80,8 @@ describe("Paths Object", () => {
7980
};
8081
};
8182
parameters?: {
82-
/** @description Page number. */
8383
query?: {
84+
/** @description Page number. */
8485
page?: number;
8586
};
8687
};

0 commit comments

Comments
 (0)