@@ -37,2 +37,3 @@ var commonHelpers, dirname, fs, generator, path, template, util; | ||
| model.methods = methodParse; | ||
| model.version = data.version; | ||
| if (data.extra) { | ||
@@ -39,0 +40,0 @@ model.extra = data.extra; |
@@ -16,9 +16,10 @@ package {{extra.package}}; | ||
| public interface {{{className}}} { | ||
| interface {{{className}}} { | ||
| {{#methods}} | ||
| @{{annotation}}("{{{uri}}}") | ||
| public Observable<{{{respond}}}> {{{name}}}({{#each args}}{{#if @index}}, {{/if}}{{{kind}}} {{type}} {{name}}{{/each}}); | ||
| @{{annotation}}("/{{{../version}}}{{{uri}}}") | ||
| Observable<{{{respond}}}> {{{name}}}({{#each args}}{{#if @index}}, {{/if}} | ||
| {{{kind}}} {{type}} {{name}}{{/each}}); | ||
| {{/methods}} | ||
| } |
@@ -90,3 +90,3 @@ var util; | ||
| innerResource = _ref3[_j]; | ||
| util.parseResource(innerResource, parsed, annotations, resource.relativeUri, uriArgs); | ||
| util.parseResource(innerResource, parsed, annotations, methodDef.uri, uriArgs); | ||
| } | ||
@@ -93,0 +93,0 @@ } |
+1
-1
| { | ||
| "name": "raml2code", | ||
| "version": "0.0.10", | ||
| "version": "0.0.11", | ||
| "description": "Raml spec to code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,2 +24,3 @@ fs = require('fs') | ||
| model.methods = methodParse | ||
| model.version = data.version | ||
| model.extra = data.extra if data.extra | ||
@@ -26,0 +27,0 @@ |
@@ -16,9 +16,10 @@ package {{extra.package}}; | ||
| public interface {{{className}}} { | ||
| interface {{{className}}} { | ||
| {{#methods}} | ||
| @{{annotation}}("{{{uri}}}") | ||
| public Observable<{{{respond}}}> {{{name}}}({{#each args}}{{#if @index}}, {{/if}}{{{kind}}} {{type}} {{name}}{{/each}}); | ||
| @{{annotation}}("/{{{../version}}}{{{uri}}}") | ||
| Observable<{{{respond}}}> {{{name}}}({{#each args}}{{#if @index}}, {{/if}} | ||
| {{{kind}}} {{type}} {{name}}{{/each}}); | ||
| {{/methods}} | ||
| } |
@@ -58,3 +58,3 @@ util = {} | ||
| for innerResource in resource.resources | ||
| util.parseResource(innerResource, parsed, annotations, resource.relativeUri, uriArgs) | ||
| util.parseResource(innerResource, parsed, annotations, methodDef.uri, uriArgs) | ||
| undefined | ||
@@ -83,2 +83,2 @@ | ||
| module.exports = util | ||
| module.exports = util |
@@ -14,16 +14,26 @@ package org.gex.client; | ||
| public interface GatitosAPI { | ||
| interface GatitosAPI { | ||
| @GET("/cats") | ||
| public Observable<Cats> getGatitos(@Query("search") String search); | ||
| @GET("/v1/cats") | ||
| Observable<Cats> getGatitos( | ||
| @Query("search") String search); | ||
| @POST("/cats") | ||
| public Observable<Cat> postGatitos(@Body Cat cat); | ||
| @POST("/v1/cats") | ||
| Observable<Cat> postGatitos( | ||
| @Body Cat cat); | ||
| @GET("/cats/{catId}") | ||
| public Observable<Cat> getGatitoById(@Path("catId") String catId, @Query("filterBy") String filterBy); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<Cat> getGatitoById( | ||
| @Path("catId") String catId, | ||
| @Query("filterBy") String filterBy); | ||
| @PUT("/cats/{catId}") | ||
| public Observable<Cat> putGatitoById(@Path("catId") String catId, @Body Cat cat); | ||
| @PUT("/v1/cats/{catId}") | ||
| Observable<Cat> putGatitoById( | ||
| @Path("catId") String catId, | ||
| @Body Cat cat); | ||
| @GET("/v1/cats/{catId}/mapping") | ||
| Observable<Cat> getSingleContentTypeMapping( | ||
| @Path("catId") String catId); | ||
| } |
Sorry, the diff of this file is not supported yet
34843
0.95%661
1.54%