lib/apipie/swagger_generator.rb
#--------------------------------------------------------------------------
# Utilities for conversion of ruby syntax to swagger syntax
#--------------------------------------------------------------------------
Utilities for conversion of ruby syntax to swagger syntax
Utilities for conversion of ruby syntax to swagger syntax
def swagger_path(str)
      str = str.gsub(/:(\w+)/, '{\1}')
      str = str.gsub(/\/$/, '')
      if str[0] != '/'
        warn_added_missing_slash(str)
        str = '/' + str
      end
      str
    end
def swagger_path ( str ) str = str . gsub ( / :( \w +) / , '{\1}' ) str = str . gsub ( / \/ $ / , '' ) if str [ 0 ] != '/' warn_added_missing_slash ( str ) str = '/' + str end str end
Utilities for conversion of ruby syntax to swagger syntax
Utilities for conversion of ruby syntax to swagger syntax
str
<not_specific>