Allow multiple intervening folders between provider name and API version#1081
Merged
Allow multiple intervening folders between provider name and API version#1081
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1081 +/- ##
=======================================
Coverage 95.89% 95.89%
=======================================
Files 18 18
Lines 317 317
=======================================
Hits 304 304
Misses 13 13
Flags with carried forward coverage won't be shown. Click here to find out more. |
| // This information is used to generate individual tags in the generated autorest configuration | ||
| // eslint-disable-next-line no-useless-escape | ||
| const pathRegex = /^(\$\(this-folder\)\/|)([^\/]+)\/[^\/]+\/(\d{4}-\d{2}-\d{2}(|-preview))\/.*\.json$/i; | ||
| const pathRegex = /^(\$\(this-folder\)\/|)([^\/]+)(?:\/[^\/]+)+\/(\d{4}-\d{2}-\d{2}(|-preview))\/.*\.json$/i; |
Member
There was a problem hiding this comment.
- Does this change the match group numbers (
match[2]&match[3]) used below? - Please could you also update the comment above regarding path format convention?
Were you able to validate this change generates the correct output when the pipeline is executed?
Member
Author
There was a problem hiding this comment.
The match group numbers remain the same ((?:...) is a non-matching group).
The updated pipeline was executed on Friday and produced this PR, which restored all the Microsoft.Compute types and had no other impact.
anthony-c-martin
approved these changes
Sep 6, 2022
Member
anthony-c-martin
left a comment
There was a problem hiding this comment.
Thanks for fixing this!
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.
Azure/azure-rest-api-specs#20103 introduced a change in the folder structure for Swagger specs for the Microsoft.Compute RP, leading to the deletion of all types for Microsoft.Compute in #1078. This PR updates the regex we use to parse swagger spec paths to accept multiple folders between the name of the provider and the API version.
Type gen result viewable at #1082