Skip to content

Conversation

captbaritone
Copy link
Contributor

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.

@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this in D78595366.

@facebook-github-bot
Copy link
Contributor

@captbaritone merged this pull request in e2aaaa8.

facebook-github-bot pushed a commit that referenced this pull request Aug 2, 2025
Summary:
Fixes #5045.

In b208fed we upgraded schemars which changed how the json schema for the compiler config is represented. It looks like the previous representation used enums of a single string literal to represent string literals. The new version uses the [const keyword](https://json-schema.org/understanding-json-schema/reference/const) for string literals.

## Before

<img width="800" height="354" alt="Screenshot 2025-08-01 at 9 39 51 AM" src="https://github.com/user-attachments/assets/66c6ca23-7707-47cf-ad4f-f4bb554b8bec" />

## After

<img width="789" height="351" alt="Screenshot 2025-08-01 at 9 39 35 AM" src="https://github.com/user-attachments/assets/36ff9995-09bf-42e9-8cdd-30c5c3633172" />

Related: #5036

Pull Request resolved: #5047

Reviewed By: evanyeung

Differential Revision: D79452138

Pulled By: captbaritone

fbshipit-source-id: 817ab1f27c5a6c415b9bac1f561291318f069409
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants