Azure / Azure/azure-sdk-tools

Support variable substitution in the swagger path of the input-file config

Open
#8,863 0 comments 0 reactions 1 assignee Claimed by @raych1 View on GitHub
Automation Tool
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

**Description**
Sometimes, the user would like to use a variable to specify the commit to be referenced in multiple swagger paths' definition. Currently, automation script only support commit hash id. Any non-hash string will be reported as invalid swagger path.

This is current validation code for the commit.
https://github.com/Azure/azure-sdk-tools/pull/7451/files#diff-b7eed6158bb784a01fa40bc9babea58b356ee4e92c6cc4a1bbfecb8e071e4de5R90-R93

This is the PR reverting the use of the variable.
https://github.com/Azure/azure-sdk-for-java/pull/41566/files

However, user can use `require` settings to specify the `readme.md` file in the spec repo. Other languages use this approach, such as .NET and JS.
https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md
https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventgrid/eventgrid/swagger/README.md

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.