Skip to content

Commit

Permalink
Minor: renaming depictRequest to depictBody. (#1794)
Browse files Browse the repository at this point in the history
Addressing todo for clarity
  • Loading branch information
RobinTail committed May 25, 2024
1 parent 3b7ecec commit 76c2cbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/documentation-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,7 @@ export const depictSecurityRefs = (
return depictSecurityRefs({ or: [container] });
};

// @todo depictBody
export const depictRequest = ({
export const depictBody = ({
method,
path,
schema,
Expand Down
4 changes: 2 additions & 2 deletions src/documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { mapLogicalContainer } from "./logical-container";
import { Method } from "./method";
import {
OpenAPIContext,
depictRequest,
depictBody,
depictRequestParams,
depictResponse,
depictSecurity,
Expand Down Expand Up @@ -221,7 +221,7 @@ export class Documentation extends OpenApiBuilder {
}

const requestBody = inputSources.includes("body")
? depictRequest({
? depictBody({
...commons,
paramNames: pluck("name", depictedParams),
schema: endpoint.getSchema("input"),
Expand Down

0 comments on commit 76c2cbf

Please sign in to comment.