This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 1067b19b90f3 Null check to allow http 200 responses with no content 
(#21955)
1067b19b90f3 is described below

commit 1067b19b90f32a7490012f05437bd11fb65d53b1
Author: renjth-81 <[email protected]>
AuthorDate: Thu Mar 12 20:16:35 2026 +0530

    Null check to allow http 200 responses with no content (#21955)
    
    Co-authored-by: Renjith Narayanan <[email protected]>
---
 .../main/java/org/apache/camel/generator/openapi/OperationVisitor.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java
 
b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java
index c8239b4b70b2..69fbf0d4abfc 100644
--- 
a/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java
+++ 
b/tooling/openapi-rest-dsl-generator/src/main/java/org/apache/camel/generator/openapi/OperationVisitor.java
@@ -253,6 +253,9 @@ class OperationVisitor<T> {
             for (String key : operation.getResponses().keySet()) {
                 if ("200".equals(key)) {
                     ApiResponse response = operation.getResponses().get(key);
+                    if (response.getContent() == null) {
+                        continue;
+                    }
                     for (final Entry<String, MediaType> entry : 
response.getContent().entrySet()) {
                         final MediaType mediaType = entry.getValue();
                         if (dto == null) {

Reply via email to