Make schema def rendering more robust #5036
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In b208fed we upgraded schemars which changed how the json schema for the compiler config is represented. This uncovered gaps in our documentation renderer. Specifically, we had hard coded the assumption that the definitions would live on the
.defintitions
property of the schema. The new version of schemars puts them under$defs
which aligns better with json schema spec.This diff makes
$defs
the default assumed location for definitions, but lets the parent pass in definitions from another location. This diff also starts the process of using versioned schemas for our versioned docs. As part of this I pulled in the version of the config schema from the commit that added the v20 docs. So, now as our current config schema changes, the v20 docs will still reflect the config as it was at the v20 release.This allows us to pressure test the docs rendering, ensuring they can render both the old and new representations.