Skip to content

Conversation

@rjmunro
Copy link

@rjmunro rjmunro commented Nov 13, 2025

About the Contributor

This pull request is posted on behalf of the BBC.

Type of Contribution

This is a Code improvement

Current Behavior

When trying to make changes to packages/timeline-state-resolver-types/src/generated/atem.ts, I couldn't immediately work out what I had to change to affect the file.

Eventually I found packages/timeline-state-resolver/src/integrations/atem/$schemas/mappings.json, but I was getting a warning from VSCode telling me that the $schema property itself wasn't allowed in the schema.

New Behavior

  • A bit more info is printed in the headers of generated typescript (although it's possibly not enough as some files seem to be generated from other files that are in turn generated).
  • $schema is allowed in the schema

Testing Instructions

Really only comments have changed.

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@rjmunro rjmunro requested a review from a team as a code owner November 13, 2025 13:07
Copy link
Member

@Julusian Julusian left a comment

Choose a reason for hiding this comment

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

I'm not sure that this should say run "yarn generate-schema-types" because that name will vary depending on where this is used.

For these schemas inside of the tsr repository that name is correct, but anyone making a tsr plugin will be using the same tsr-schema-types tool through whatever script they want. It may or may not be yarn generate-schema-types for them, and may not even be yarn

But I like including the file path in the banner

@rjmunro rjmunro force-pushed the rjmunro/improve-json-schema branch 2 times, most recently from 3d2f970 to 4410393 Compare November 17, 2025 11:14
* Show path to source file
* Show actual yarn command to run to update
Without this, VSCode warns that $schema is not allowed.
@rjmunro rjmunro force-pushed the rjmunro/improve-json-schema branch from 4410393 to 2bfc824 Compare November 17, 2025 11:18
@Saftret Saftret added the Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) label Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution from BBC Contributions sponsored by BBC (bbc.co.uk)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants