You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.
Using OpenAPI maven generator and Feign, but the default encoder doesn't allow OffsetDateTime
Snippets from Open API contract:
/images: post: tags: - image summary: uploadImage operationId: uploadImage requestBody: $ref: '#/components/requestBodies/UploadImageRequest' responses: "201": $ref: '#/components/responses/ImagesResponse' default: $ref: '#/components/responses/ErrorResponse' requestBodies: UploadImageRequest: content: multipart/form-data: schema: $ref: '#/components/schemas/UploadImage' UploadImage: type: object properties: upload_date: type: string format: date-time image: type: string format: binary
I had to create this encoder as workaround to the problem
`import feign.RequestTemplate;
import feign.codec.EncodeException;
import feign.codec.Encoder;
import java.lang.reflect.Type;
import java.time.OffsetDateTime;
public class OffsetDateTimeAwareFormEncoder implements Encoder {
}`
The text was updated successfully, but these errors were encountered: