Skip to content

Fix description memoization in bundle schema#1409

Merged
shreyas-goenka merged 3 commits intomainfrom
fix/schema-doc-copy
May 1, 2024
Merged

Fix description memoization in bundle schema#1409
shreyas-goenka merged 3 commits intomainfrom
fix/schema-doc-copy

Conversation

@shreyas-goenka
Copy link
Copy Markdown
Contributor

@shreyas-goenka shreyas-goenka commented Apr 30, 2024

Changes

Fixes #559

The CLI generation is now stable and does not produce a diff for the bundle_descriptions.json file.

Before a pointer to the schema was stored in the memo, which would be mutated later to include the description. This lead to duplicate documentation for schema components that were used in multiple places. This PR fixes this issue.

Eg: Before all references of pause_status would have the same description.

Tests

Added regression test.

}
root = selfRef
root = &selfRef
root.Description = description
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The location where we accidentally mutated the description stored in the memo.

@shreyas-goenka shreyas-goenka added this pull request to the merge queue May 1, 2024
Merged via the queue into main with commit 3021586 May 1, 2024
@shreyas-goenka shreyas-goenka deleted the fix/schema-doc-copy branch May 1, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updating documentation when schema is used multiple times gives incorrect result

2 participants