You can clone with
HTTPS or Subversion.
I have a case that the basePath of API cannot be determined until run-time, so I did the following.
##~ @api.basePath = "<%= @base_path %>"
Then I ran the tool and hoped the result is:
"basePath":"<%= @base_path %>"
However, the actual result is:
"basePath":"<%= base_path %>"
Is that anyway I can walk around? Thanks.
Quite a use case you have :-) The problem is that instance variables are "removed" doing a @ substitution, which also affect the @ on your string "<%= @base_path %>". Source2swagger is used SAFE=4 to avoid "accidents" and in this safely level instance variables cannot be written.
Will check if there is a way around it.
Do not replace @ when it's within a String with double quotes, issue #6
The commit 91cf0de should fix the issue. See the example test/data/sample6.rb
Cool. Thanks for the fix.