raml2code-fixtures
Advanced tools
+1
-1
| { | ||
| "name": "raml2code-fixtures", | ||
| "version": "0.0.11", | ||
| "version": "0.0.12", | ||
| "description": "fixtures for raml2code", | ||
@@ -5,0 +5,0 @@ "main": "test-utils.js", |
+8
-4
@@ -69,4 +69,9 @@ var path = require('path'), | ||
| if (fixtureName !== undefined) { | ||
| var sampleFileFs; | ||
| if(path.resolve(fixtureName) === path.normalize(fixtureName)){ | ||
| sampleFileFs= fixtureName; | ||
| }else{ | ||
| sampleFileFs = codeReferences + fixtureName; | ||
| } | ||
| var sampleFileFs = codeReferences + fixtureName; | ||
| var sampleText = fs.readFileSync(sampleFileFs); | ||
@@ -95,3 +100,2 @@ | ||
| exports.runSimpleTest = function (raml, generator, extra, sampleFile, validateWith, logContent) { | ||
| return function (done) { | ||
@@ -105,3 +109,4 @@ loadFixtureRaml(raml, function (data, done) { | ||
| data.extra = extra; | ||
| data2Code.process(data, generator); | ||
| var results = data2Code.process(data, generator); | ||
| handleRender(done, sampleFile, validateWith, logContent, results); | ||
| done(); | ||
@@ -135,3 +140,2 @@ | ||
| var handleRender = function (done, sampleFile, validateWith, logContent, results) { | ||
| var validateWithContent = _.find(results, function (arr) { | ||
@@ -138,0 +142,0 @@ return arr[validateWith] !== undefined |
| package org.gex.client.v1; | ||
| import retrofit.http.*; | ||
| import retrofit.client.Response; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import rx.Observable; | ||
| import retrofit.mime.TypedFile; | ||
| import com.pojos.v1.*; | ||
| public interface FixtureAPI { | ||
| @GET("/v1/cats") | ||
| Observable<List> getGatitosAndSearchBy( | ||
| @Query("searchBy") String searchBy); | ||
| @GET("/v1/cats") | ||
| Observable<List> getGatitos(); | ||
| @POST("/v1/cats") | ||
| Observable<ComplexCat> postGatitos( | ||
| @Body ComplexCat complexCat); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoByIdAndClientSecretAndOrderByAndFilterBy( | ||
| @Path("catId") String catId, | ||
| @Query("clientSecret") String clientSecret, | ||
| @Query("orderBy") String orderBy, | ||
| @Query("filterBy") String filterBy); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoByIdAndOrderByAndFilterBy( | ||
| @Path("catId") String catId, | ||
| @Query("orderBy") String orderBy, | ||
| @Query("filterBy") String filterBy); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoByIdAndClientSecretAndFilterBy( | ||
| @Path("catId") String catId, | ||
| @Query("clientSecret") String clientSecret, | ||
| @Query("filterBy") String filterBy); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoByIdAndFilterBy( | ||
| @Path("catId") String catId, | ||
| @Query("filterBy") String filterBy); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoByIdAndClientSecretAndOrderBy( | ||
| @Path("catId") String catId, | ||
| @Query("clientSecret") String clientSecret, | ||
| @Query("orderBy") String orderBy); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoByIdAndOrderBy( | ||
| @Path("catId") String catId, | ||
| @Query("orderBy") String orderBy); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoByIdAndClientSecret( | ||
| @Path("catId") String catId, | ||
| @Query("clientSecret") String clientSecret); | ||
| @GET("/v1/cats/{catId}") | ||
| Observable<ComplexCat> getGatitoById( | ||
| @Path("catId") String catId); | ||
| @PUT("/v1/cats/{catId}") | ||
| Observable<ComplexCat> putGatitoById( | ||
| @Path("catId") String catId, | ||
| @Body ComplexCat complexCat); | ||
| @GET("/v1/cats/{catId}/mapping") | ||
| Observable<ComplexCat> getSingleContentTypeMapping( | ||
| @Path("catId") String catId); | ||
| @POST("/v1/cats/{catId}/picture") | ||
| @Multipart | ||
| Observable<ComplexCat> postGatitoByIdPicture( | ||
| @Path("catId") String catId, | ||
| @Part("file") TypedFile file); | ||
| @POST("/v1/cats/{catId}/webFormCat") | ||
| @FormUrlEncoded | ||
| Observable<ComplexCat> postGatitopByIdForm( | ||
| @Path("catId") String catId, | ||
| @Field("name") String name); | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
51945
-5.06%32
-5.88%1200
-5.14%