Skip to content

Fix regressions in generated documentation#279

Merged
vladimir-rangelov merged 7 commits intonext-bidirectionalfrom
fix/regressions_in_generated_documentation
Oct 8, 2025
Merged

Fix regressions in generated documentation#279
vladimir-rangelov merged 7 commits intonext-bidirectionalfrom
fix/regressions_in_generated_documentation

Conversation

@vladimir-rangelov
Copy link
Contributor

Completely rewrite removeUnusedSchemas and add unit tests for it.

getLocalSchemas(document).forEach((path) => {
const parts = path.split('/')
// Drop the grouping path element, since we've pulled this schema out into it's own document
if (parts.length === 4 && path.startsWith('#/x-schemas/' + document.info.title + '/')) {
Copy link
Contributor

@tomasz-blasz tomasz-blasz Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, comment on why there is a 4 — or even better, extract it as a const. It’ll make our lives much happier when inspecting the code later 😉
applies to line 299 as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor

@tomasz-blasz tomasz-blasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good apart from mysterious '4'

@vladimir-rangelov vladimir-rangelov changed the title Fix/regressions in generated documentation Fix regressions in generated documentation Oct 8, 2025
@vladimir-rangelov vladimir-rangelov merged commit 790f26e into next-bidirectional Oct 8, 2025
2 of 3 checks passed
@vladimir-rangelov vladimir-rangelov deleted the fix/regressions_in_generated_documentation branch October 8, 2025 10:32
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants