Skip to content

Commit

Permalink
Added file extension for exports.
Browse files Browse the repository at this point in the history
  • Loading branch information
mittsh committed Dec 18, 2014
1 parent af7b7ea commit 9dc790d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions JavaApacheHttpClientFluentAPICodeGenerator.coffee
Expand Up @@ -2,12 +2,12 @@ require "mustache.js"

addslashes = (str) ->
("#{str}").replace(/[\\"]/g, '\\$&')

multiLinesToSingleLine = (str) ->
("#{str}").replace(/[\n"]/g, '\\n')

JavaApacheHttpClientFluentAPICodeGenerator = ->

@url = (request) ->
return {
"fullpath": request.url
Expand Down Expand Up @@ -42,7 +42,7 @@ JavaApacheHttpClientFluentAPICodeGenerator = ->
}

multipart_body = request.multipartBody
if multipart_body
if multipart_body
return {
"has_multipart_body":true
"multipart_body": ({
Expand Down Expand Up @@ -82,7 +82,7 @@ JavaApacheHttpClientFluentAPICodeGenerator = ->

@generate = (context) ->
request = context.getCurrentRequest()

view =
"request": context.getCurrentRequest()
"method": request.method[0].toUpperCase() + request.method[1..-1].toLowerCase()
Expand All @@ -97,8 +97,9 @@ JavaApacheHttpClientFluentAPICodeGenerator = ->


JavaApacheHttpClientFluentAPICodeGenerator.identifier =
"com.luckymarmot.PawExtensions.JavaApacheHttpClientFluentAPICodeGenerator";
"com.luckymarmot.PawExtensions.JavaApacheHttpClientFluentAPICodeGenerator"
JavaApacheHttpClientFluentAPICodeGenerator.title =
"Java (Apache HttpClient via Fluent API)";
"Java (Apache HttpClient via Fluent API)"
JavaApacheHttpClientFluentAPICodeGenerator.fileExtension = "java"

registerCodeGenerator JavaApacheHttpClientFluentAPICodeGenerator

0 comments on commit 9dc790d

Please sign in to comment.