Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Character '@' is missing #6

hongbin opened this Issue · 3 comments

2 participants


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.


The commit 91cf0de should fix the issue. See the example test/data/sample6.rb


Cool. Thanks for the fix.

@solso solso closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.