microsoftgraph / msgraph-beta-sdk-dotnet

The Microsoft Graph Client Beta Library for .NET supports the Microsoft Graph /beta endpoint. (preview)
Other
90 stars 29 forks source link

Need a way to associate releases to metadata versions #127

Open zengin opened 4 years ago

zengin commented 4 years ago

Today, we take a snapshot from https://graph.microsoft.com/beta/$metadata, write it to https://github.com/microsoftgraph/msgraph-metadata/blob/master/beta_metadata.xml and then continue with XSLT and SDK generation. After the generation, there is no easy way to associate SDK release to which version of metadata it has consumed.

One can go to release date, check when the PR is opened, then associate the date/time of that to the beta_metadata.xml version, but this is a long path. And it can cause confusion when the releases are skipped or PRs take long time etc.

I would propose one or more of the following:

  1. Having a link to beta_metadata.xml file in release notes with a commit hash. Linking to main branch won't work as the branch moves forward.
  2. Checking in the version of beta_metadata.xml into msgraph-beta-sdk-dotnet repo. Release notes already link to a snapshot of the repository at the time of release.
  3. Having a folder for releases in msgraph-metadata to keep the snapshots of metadata.

The argument for option 3 vs option 2 is that metadata files will live metadata repo, where SDK goes to SDK repo. But doing this in metadata repo can't be language-agnostic, given that SDK generations for different languages are independently versioned.

Same issue should be addressed for v1.0 as well. AB#7134

ddyett commented 4 years ago

option2 involves copying the file around which doesn't have inherent use in the process of the SDK so I don't love that one. Option 3 has issues due to the differently languages being independently versioned. So I'd prefer option 1 as all you really want is a reference for look up.

syprieur commented 2 years ago

MSGraph could expose the internal schema version as a response header for $metadata if that'd help.