Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-113978

Error creating java method signature returning integer

    Details

      Description

      When REST Builder is executed with an OpenAPI YAML file containing a path that returns an integer as response, the generated java method has wrong return type assigning String.

      Generated code is:

      public String getContactsCount() throws Exception {
         return StringPool.BLANK;
      }
      

      Instead of something like:

      public int getContactsCount() throws Exception {
         return 0;
      }
      

      Steps to reproduce it:

      1. Create a new module with the attached YAML files (modifying configuration if needed).
      2. Execute gw buildRest

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                9 weeks ago

                Packages

                Version Package
                7.0.X
                7.1.X
                7.2.X
                7.3.3 CE GA4
                Master