Generate metadata.json for Azure services#3169
Merged
MaryGao merged 19 commits intoAzure:mainfrom May 22, 2025
Merged
Conversation
MaryGao
reviewed
May 12, 2025
…nto generate-metadatajson
…nto generate-metadatajson
MaryGao
reviewed
May 20, 2025
MaryGao
reviewed
May 20, 2025
MaryGao
reviewed
May 20, 2025
MaryGao
reviewed
May 20, 2025
MaryGao
reviewed
May 20, 2025
…utorest.typescript into generate-metadatajson
…nto generate-metadatajson
MaryGao
reviewed
May 21, 2025
MaryGao
reviewed
May 21, 2025
MaryGao
reviewed
May 21, 2025
MaryGao
reviewed
May 21, 2025
MaryGao
reviewed
May 21, 2025
…nto generate-metadatajson
MaryGao
approved these changes
May 21, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds metadata.json generation for Azure-flavored services by extracting the API and emitter versions and emitting the file alongside other outputs.
- Introduces
getTypespecTsVersionto fetch the Typespec-TS emitter version - Defines
buildMetadataJsonto create a metadata.json withapiVersionand/oremitterVersion - Emits the metadata.json file in the Azure flavor path
Comments suppressed due to low confidence (2)
packages/typespec-ts/src/index.ts:364
- There are no unit tests covering the new
buildMetadataJsonlogic. Consider adding tests to verify correct JSON output whenapiVersionand/oremitterVersionare present or absent.
function buildMetadataJson() {
packages/typespec-ts/src/index.ts:503
- The
buildMetadataJsonbuilder is invoked twice for Azure flavor—once insidegenerateMetadataAndTestand again after it. Removing the redundant call will prevent duplicate file emissions or overwrites.
if (isAzureFlavor) {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes #3005