RE: CXF JAX-RS: working with multipart form-data

2024-07-05 Thread Jean Pierre URKENS
Hi Andriy,

When searching the net I came along this Jersey annotation but since I was
not depending on 'Jersey' components I skipped it. So apparently
swagger-core has processing for externally defined annotations (like this
FormDataParam in Jersey), indeed inside know-how.

I included it in my project as io.swagger.v3.oas.annotations.FormDataParam,
since it should somehow be included in the supported  swagger annotations
(maybe we should submit a request for it to the swagger-core team) and this
indeed generates an appropriate openapi.json spec.

Thanks alot,

J.P. Urkens



-Original Message-
From: Andriy Redko 
Sent: vrijdag 5 juli 2024 2:16
To: Jean Pierre URKENS ; dev@cxf.apache.org
Subject: Re: CXF JAX-RS: working with multipart form-data

Hi Jean,

Here is how you could make it work (there is some magic knowledge involved
sadly). First of all, define such annotation anywhere in your codebase
(where it dims appropriate):

import java.lang.annotation.ElementType; import
java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface FormDataParam {
String value();
}

Use this annotation on each Attachment parameter:

/* Skipping other annotations as those are not important here */ public
Response createMessage(
 @HeaderParam("x-correlation-id") @NotNull @Size(min = 10, max = 36)
@Parameter(description="ID of the transaction. Use this ID for log tracing
and incident handling.") String xCorrelationId,
 @HeaderParam("Idempotency-Key") @Size(min = 10, max = 36)
@Parameter(description="When retrying a failed call, the retry call should
have the same Idempotency Key.") String idempotencyKey,
 @FormDataParam("upfile1") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile1",
type="application/octet-stream", required = false) InputStream
upfile1Detail,
 @FormDataParam("upfile2") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile2",
type="application/octet-stream", required = false) InputStream
upfile2Detail,
 @FormDataParam("upfile3") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile3",
type="application/octet-stream", required = false) Attachment upfile3Detail,
 @FormDataParam("upfile4") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile4",
type="application/octet-stream", required = false) Attachment upfile4Detail,
 @FormDataParam("upfile5") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile5",
type="application/octet-stream", required = false) Attachment upfile5Detail,
 @FormDataParam("upfile6") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile6",
type="application/octet-stream", required = false) Attachment upfile6Detail,
 @FormDataParam("upfile7") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile7",
type="application/octet-stream", required = false) Attachment upfile7Detail,
 @FormDataParam("upfile8") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile8",
type="application/octet-stream", required = false) Attachment upfile8Detail,
 @FormDataParam("upfile9") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile9",
type="application/octet-stream", required = false) Attachment upfile9Detail,
 @FormDataParam("upfile10") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile10",
type="application/octet-stream", required = false) Attachment
upfile10Detail,
 @FormDataParam("upfile11") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile11",
type="application/octet-stream", required = false) Attachment
upfile11Detail,
 @FormDataParam("upfile12") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile12",
type="application/octet-stream", required = false) Attachment
upfile12Detail,
 @FormDataParam("upfile13") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile13",
type="application/octet-stream", required = false) Attachment
upfile13Detail,
 @FormDataParam("upfile14") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile14",
type="application/octet-stream", required = false) Attachment
upfile14Detail,
 @FormDataParam("upfile15") @Parameter(schema = @Schema(type =
"string", format = "binary")) @Multipart(value = "upfile15",
type="application/octet-stream", required = false) Attachment
upfile15Detail,
 @FormDataParam("upfile16") @Parameter(sche

Re: [PR] Bump org.codehaus.plexus:plexus-archiver from 4.9.2 to 4.10.0 [cxf]

2024-07-05 Thread via GitHub


reta merged PR #1951:
URL: https://github.com/apache/cxf/pull/1951


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cxf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Bump org.jboss.arquillian.testng:arquillian-testng-container from 1.8.0.Final to 1.8.1.Final [cxf]

2024-07-05 Thread via GitHub


reta commented on PR #1941:
URL: https://github.com/apache/cxf/pull/1941#issuecomment-2211325807

   Not compatible with https://github.com/arquillian/arquillian-container-weld 
:(


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cxf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] Cleanup Arquillian + Weld dependencies to get rid of *-alpha artifacts [cxf]

2024-07-05 Thread via GitHub


reta opened a new pull request, #1952:
URL: https://github.com/apache/cxf/pull/1952

   Cleanup Arquillian + Weld dependencies to get rid of *-alpha artifacts


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cxf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org