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

Customize schema component rendering #56

Merged
merged 1 commit into from
Jan 6, 2024
Merged

Conversation

gnidan
Copy link
Member

@gnidan gnidan commented Jan 6, 2024

  • Use new docusaurus-json-schema-plugin version with support for components knowing their own pointer and depth level

  • Define "schema index" to allow schemas to have a canonical URL

  • When rendering a subschema, check if it has a canonical URL in the index and render a link to that page instead of the full subschema

  • Preprocess schemas to add an internal ID field to every object recursively in the schema. Use this ID field when checking against schema index.

  • Remove "Conditional subschemas" dropdown that wraps if/then/else constructs

  • Define a custom { allOf: { if, then } } detection system to recognize this common pattern for implementing discriminators

- Use new docusaurus-json-schema-plugin version with support for
  components knowing their own pointer and depth level

- Define "schema index" to allow schemas to have a canonical URL

- When rendering a subschema, check if it has a canonical URL in the
  index and render a link to that page instead of the full subschema

- Preprocess schemas to add an internal ID field to every object
  recursively in the schema. Use this ID field when checking against
  schema index.

- Remove "Conditional subschemas" dropdown that wraps if/then/else
  constructs

- Define a custom `{ allOf: { if, then } }` detection system to
  recognize this common pattern for implementing discriminators
@gnidan gnidan merged commit 6de76da into main Jan 6, 2024
4 checks passed
@gnidan gnidan deleted the customize-schema-components branch January 6, 2024 08:30
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.

1 participant