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

Swagger is not generating schema ref for body parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.18.1
    • 2.18.2, 2.19.0
    • camel-swagger
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: