Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10675

Swagger is not generating schema ref for body parameter

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.18.1
    • Fix Version/s: 2.18.2, 2.19.0
    • Component/s: camel-swagger
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

                  // favor keeping any existing model that has the vendor extension in the model
                  boolean oldExt = false;
                  if (swagger.getDefinitions() != null && swagger.getDefinitions().get(entry.getKey()) != null) {
                      Model oldModel = swagger.getDefinitions().get(entry.getKey());
                      if (oldModel.getVendorExtensions() != null && !oldModel.getVendorExtensions().isEmpty()) {
                          oldExt = oldModel.getVendorExtensions().get("x-className") == null;
                      }
                  }
      
                  if (!oldExt) {
                      swagger.model(entry.getKey(), entry.getValue());
                  }
      

      The logic is invalid. Should not update model when oldModel.getVendorExtensions().get("x-className") != null

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                stepienj Jacek Stępień
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: