diff --git a/client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/QuarkusJavaClientCodegen.java b/client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/QuarkusJavaClientCodegen.java index e78a176e0..69b2670af 100644 --- a/client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/QuarkusJavaClientCodegen.java +++ b/client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/QuarkusJavaClientCodegen.java @@ -142,6 +142,14 @@ public void postProcess() { } + @Override + public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { + super.postProcessModelProperty(model, property); + if ("set".equals(property.containerType)) { + model.imports.add("Arrays"); + } + } + @Override public CodegenModel fromModel(String name, Schema model) { CodegenModel codegenModel = super.fromModel(name, model); diff --git a/client/integration-tests/array-enum/src/main/openapi/array-enum.yaml b/client/integration-tests/array-enum/src/main/openapi/array-enum.yaml index 843a20332..c2a414b2f 100644 --- a/client/integration-tests/array-enum/src/main/openapi/array-enum.yaml +++ b/client/integration-tests/array-enum/src/main/openapi/array-enum.yaml @@ -17,6 +17,11 @@ paths: required: true schema: $ref: '#/components/schemas/webhook_create_update_payload' + - name: data-set + in: query + required: false + schema: + $ref: '#/components/schemas/webhook_create_update_set_payload' responses: "200": description: OK @@ -47,13 +52,47 @@ components: - message_created - message_updated - webwidget_triggered + default: + - conversation_created + description: The events you want to subscribe to. + message: + type: array + items: + type: string + description: Non required Field to safe messages + messageMap: + type: object + additionalProperties: true + description: Non required Map Field to safe messages + webhook_create_update_set_payload: + required: [url, subscriptions] + type: object + properties: + url: + type: string + description: The url where the events should be sent + subscriptions: + type: array + uniqueItems: true + items: + type: string + enum: + - conversation_created + - conversation_status_changed + - conversation_updated + - message_created + - message_updated + - webwidget_triggered + default: + - conversation_created description: The events you want to subscribe to. message: type: array + uniqueItems: true items: type: string description: Non required Field to safe messages messageMap: type: object additionalProperties: true - description: Non required Map Field to safe messages \ No newline at end of file + description: Non required Map Field to safe messages