Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Get documentation on resource render #2634

Merged
merged 2 commits into from
Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function createResourcesList(
paths: string[],
methods: Method[]
): IResourceLink[] {
const { segment, children } = parent;
const { segment, children, labels } = parent;
const links: IResourceLink[] = [];
const childPaths = Array.from(new Set([...paths, segment]));
if (methods.length > 1) {
Expand All @@ -49,7 +49,8 @@ export function createResourcesList(
},
segment,
childPaths,
method
method,
getLink(labels, version, method)
)
);
});
Expand Down Expand Up @@ -81,7 +82,8 @@ export function createResourcesList(
info: IResource,
parent: string,
paths: string[] = [],
method?: Method
method?: Method,
docLink?: string
): IResourceLink {
const { segment, labels } = info;
const level = paths.length;
Expand Down Expand Up @@ -110,7 +112,6 @@ export function createResourcesList(
? true
: false;

const docLink = getLink(labels, version, method);
const pathItems = Array.from(new Set([...paths, segment]));
const key = generateKey(method, pathItems, version);

Expand All @@ -126,7 +127,8 @@ export function createResourcesList(
method: method?.toUpperCase(),
type,
links: versionedChildren,
docLink
docLink: docLink ? docLink : getLink(labels, version, method)

};
}

Expand Down