--------------------------------------------
On Thu, 1/26/17, tony tam <[email protected]> wrote:

 Subject: Re: Can we have more than one InputStream in the Swagger UI ?
 To: [email protected]
 Date: Thursday, January 26, 2017, 12:08 AM
 
 Hi Sundar, I
 think there are two issues.
 First off, only one File is supported
 per operation in the 2.0 specification.  I understand
 that’s an annoying limitation but it is the spec, and you
 cannot expect tooling to support multiple files in one
 operation.
 Next,
 that error message is very, very hard to track down.  Take
 a look at this example for how to do it properly:
 
https://github.com/swagger-api/swagger-samples/blob/master/java/java-jersey-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java#L95
 
 On Jan 25, 2017, at 2:04 PM, Sundar
 Saranathan <[email protected]>
 wrote:
 Hi,
 I have
 an API that needs two input files.  I was thinking of
 using
  @ApiParam(value = "data1",
 required=true,allowMultiple =true) InputStream
 inputStream1
  @ApiParam(value = "data2",
 required=true,allowMultiple =true) InputStream
 inputStream2
 
 Inside the code, I read
 the contents of inputstream and convert that to a file .
 
 However, I am getting errors when the
 app is initialized and also, the contents of the first
 InputStream is not passed to the API.  Only the contents in
 the second InputStream goes through..
 
  [ERROR   ] The following errors
 and warnings have been detected with resource and/or
 provider classes:
  
 SEVERE: Missing dependency for method public
 javax.ws.rs.core.Response
 com.xxx.test(java.io.InputStream,java.io.InputStream) throws
 org.json.JSONException at parameter at index 0
   SEVERE: Missing
 dependency for method public javax.ws.rs.core.Response
 com.xxx.test(java.io.InputStream,java.io.InputStream) throws
 org.json.JSONException at parameter at index 1
   SEVERE: Method, public
 javax.ws.rs.core.Response
 com.xxx.test(java.io.InputStream,java.io.InputStream) throws
 org.json.JSONException, annotated with POST of resource,
 class com.xxx.test, is not recognized as valid resource
 method.
 [ERROR   ]
 SRVE0271E: Uncaught init() exception created by servlet
 [Jersey Web Application] in application [RestTEst]:
 com.sun.jersey.spi.inject.Errors$ErrorMessagesException
     at
 com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170)
 
 Is this supported ?
 
 Thanks in Advance,
 
 Sundar.
 
 
 
 -- 
 
 You received this message because you are subscribed to the
 Google Groups "Swagger" group.
 
 To unsubscribe from this group and stop receiving emails
 from it, send an email to [email protected].
 
 For more options, visit https://groups.google.com/d/optout.
 
 
 
 
 -- 
 
 You received this message because you are subscribed to the
 Google Groups "Swagger" group.
 
 To unsubscribe from this group and stop receiving emails
 from it, send an email to [email protected].
 
 For more options, visit https://groups.google.com/d/optout.
 a principiu  s-a admis ca in toate actiunile ce vor avea loc in statele din 
Balcani  Uniunea Sovietica sa nu participe oficial Ajutorul efectiv  cu oameni 
si mijloace materiale  este dat numai de catre comunistii grupati in centre  
care-si iau asupra-si responsabilitatea pentru ei

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to