swagger-api/swagger-codegen

[JaxRsCxfServer] Improvements for generated Unittests and Attachments

Open

#4.513 geöffnet am 6. Jan. 2017

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)HTML (5.474 Forks)batch import
Enhancement: GeneralServer: Javahelp wanted

Repository-Metriken

Stars
 (12.701 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

From #4088:

1.) currently in the tests the api invocations are commented out and thus cannot be compiled. Wouldn't it be good to activate them and run the CI maven build with -DskipTests?

2.) Handling CXF Attachments is not totally intuitive, do you think it makes sense to add an assistance snippet here like this at api_test.mustache (for #isFile):

InputStream mybytesInput = new FileInputStream("....");
org.apache.cxf.jaxrs.ext.multipart.ContentDisposition cd = new org.apache.cxf.jaxrs.ext.multipart.ContentDisposition("attachment;filename=file.txt");
Attachment attachment = new Attachment("file", mybytesInput, cd);

or does that go too far and we should leave with the default Attachment attachment = null;?

Swagger-codegen version

2.2.2-SNAPSHOT

Related issues

#4088 Minor improvements JaxRsCXFServer

Suggest a Fix

Contributor Guide