Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1971

MicroProfile OpenAPI fails on resource methods taking parameterized arguments or arrays

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2018.5.0
    • Component/s: None
    • Labels:
      None

      Description

      See e.g. https://github.com/vibe13/license-dictionary/commit/811a05fb02d403527b3b448a0c61b87ef6216cc6#commitcomment-28543315

      JandexUtil::getRequestBodyParameterClassType looks as follows:

          public static Type getRequestBodyParameterClassType(MethodInfo method) {
              List<Type> methodParams = method.parameters();
              if (methodParams.isEmpty()) {
                  return null;
              }
              for (short i = 0; i < methodParams.size(); i++) {
                  if (JandexUtil.getParameterAnnotations(method, i).isEmpty()) {
                      return methodParams.get(i).asClassType();
                  }
              }
              return null;
          }
      

      methodParams.get.asClassType() throws an exception if the type of the param is not a "normal" class type.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mszynkie Michal Szynkiewicz
                Reporter:
                mszynkie Michal Szynkiewicz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: