| apply plugin: 'groovy' | ||
| defaultTasks 'build' | ||
| buildscript { | ||
| repositories { | ||
| jcenter() | ||
| } | ||
| dependencies { | ||
| classpath "be.filipblondeel.gradle:gradle-gulp-plugin:${gulpPluginVersion}" | ||
| } | ||
| } | ||
| repositories{ | ||
| mavenCentral() | ||
| mavenLocal() | ||
| jcenter() | ||
| maven { url "http://repo.spring.io/libs-release" } | ||
| maven { url "http://repo.spring.io/libs-snapshot" } | ||
| } | ||
| dependencies { | ||
| compile "org.codehaus.groovy:groovy-all:${project.groovyVersion}" | ||
| compile 'org.hibernate:hibernate-validator:5.1.3.Final' | ||
| compile "com.squareup.retrofit:retrofit:${project.retrofitVersion}" | ||
| compile("io.reactivex:rxgroovy:${rxVersion}"){ | ||
| exclude module:"groovy-all" | ||
| } | ||
| compile "javax.ws.rs:javax.ws.rs-api:${rsApiVersion}" | ||
| compile "org.glassfish.jersey.media:jersey-media-multipart:${jerseyVersion}" | ||
| } | ||
| apply plugin: 'gulp' | ||
| node { | ||
| // Version of node to use. | ||
| version = '0.10.28' | ||
| // Enabled the automatic download. False is the default (for now). | ||
| download = true | ||
| } | ||
| gulp_build.dependsOn 'installGulp' | ||
| sourceSets { | ||
| main { | ||
| java { | ||
| srcDirs = [] | ||
| } | ||
| groovy { | ||
| srcDirs += ['src/generated/groovy', 'src/generated/java', 'src/main/java'] | ||
| } | ||
| } | ||
| integrationTest { | ||
| java { | ||
| srcDirs = [] | ||
| } | ||
| groovy { | ||
| srcDirs += ['src/test/integration/java','src/test/integration/groovy', 'src/generated/groovy', 'src/generated/java', 'src/ma/java'] | ||
| } | ||
| resources { | ||
| srcDir 'src/test/integration/resources' | ||
| } | ||
| } | ||
| } |
| gulpPluginVersion = 0.1 | ||
| groovyVersion = 2.3.7 | ||
| retrofitVersion=1.8.0 | ||
| rxVersion=1.0.0 | ||
| rsApiVersion=2.0.1 | ||
| jerseyVersion=2.13 |
@@ -8,4 +8,4 @@ { | ||
| "gulp-raml": "0.1.3", | ||
| "raml2code": "0.0.14" | ||
| "raml2code": "0.0.27" | ||
| } | ||
| } |
@@ -5,4 +5,4 @@ | ||
| @NotNull{{/if}}{{#if min}} | ||
| @Min({{min}}){{/if}}{{#if max}} | ||
| @Max({{max}}){{/if}}{{#if decimalMin}} | ||
| @Min({{min}}l){{/if}}{{#if max}} | ||
| @Max({{max}}l){{/if}}{{#if decimalMin}} | ||
| @DecimalMin("{{decimalMin}}"){{/if}}{{#if decimalMax}} | ||
@@ -9,0 +9,0 @@ @DecimalMax("{{decimalMax}}"){{/if}}{{#if size}} |
@@ -16,2 +16,5 @@ package {{extra.package}}; | ||
| @{{annotation}}("/{{{../version}}}{{{uri}}}") | ||
| {{#if additionalAnnotation}} | ||
| @{{additionalAnnotation}} | ||
| {{/if}} | ||
| Observable<{{{respond}}}> {{{name}}}({{#each args}}{{#if @index}},{{/if}} | ||
@@ -18,0 +21,0 @@ {{{kind}}} {{type}} {{name}}{{/each}}); |
@@ -196,6 +196,7 @@ var deref, util, _; | ||
| formData = _.find(methodDef.args, function(arg) { | ||
| return arg.type === "InputStream"; | ||
| return arg.type === "InputStream" || arg.type === "TypedFile"; | ||
| }); | ||
| if (formData) { | ||
| methodDef.consumes = "MediaType.MULTIPART_FORM_DATA"; | ||
| methodDef.additionalAnnotation = "Multipart"; | ||
| } | ||
@@ -202,0 +203,0 @@ methodDef.name = m.method + resource.displayName; |
+1
-1
| { | ||
| "name": "raml2code", | ||
| "version": "0.0.27", | ||
| "version": "0.0.28", | ||
| "description": "Raml spec to code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,4 +5,4 @@ | ||
| @NotNull{{/if}}{{#if min}} | ||
| @Min({{min}}){{/if}}{{#if max}} | ||
| @Max({{max}}){{/if}}{{#if decimalMin}} | ||
| @Min({{min}}l){{/if}}{{#if max}} | ||
| @Max({{max}}l){{/if}}{{#if decimalMin}} | ||
| @DecimalMin("{{decimalMin}}"){{/if}}{{#if decimalMax}} | ||
@@ -9,0 +9,0 @@ @DecimalMax("{{decimalMax}}"){{/if}}{{#if size}} |
@@ -16,2 +16,5 @@ package {{extra.package}}; | ||
| @{{annotation}}("/{{{../version}}}{{{uri}}}") | ||
| {{#if additionalAnnotation}} | ||
| @{{additionalAnnotation}} | ||
| {{/if}} | ||
| Observable<{{{respond}}}> {{{name}}}({{#each args}}{{#if @index}},{{/if}} | ||
@@ -18,0 +21,0 @@ {{{kind}}} {{type}} {{name}}{{/each}}); |
@@ -134,6 +134,7 @@ _ = require('lodash') | ||
| formData = _.find(methodDef.args, (arg)-> | ||
| arg.type is "InputStream" | ||
| arg.type is "InputStream" or arg.type is "TypedFile" | ||
| ) | ||
| if formData | ||
| methodDef.consumes = "MediaType.MULTIPART_FORM_DATA" | ||
| methodDef.additionalAnnotation = "Multipart" | ||
| methodDef.name = m.method + resource.displayName | ||
@@ -140,0 +141,0 @@ methodDef.displayName = resource.displayName |
@@ -24,4 +24,4 @@ package org.gex.v1 | ||
| /* The age of the cat */ | ||
| @Min(1) | ||
| @Max(15) | ||
| @Min(1l) | ||
| @Max(15l) | ||
| Long age | ||
@@ -28,0 +28,0 @@ |
@@ -35,2 +35,3 @@ package org.gex.client.v1; | ||
| @POST("/v1/cats/{catId}/picture") | ||
| @Multipart | ||
| Observable<Cat> postGatitoByIdPicture( | ||
@@ -37,0 +38,0 @@ @Path("catId") String catId, |
Sorry, the diff of this file is not supported yet
54312
3.74%47
4.44%878
0.23%