Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-95476

Generated Jira swagger doc confused client's code generation

XMLWordPrintable

      Issue Summary

      We have identified the mis-usages of @Schema annotation on ApprovalConfigurationDTO::exclude, which ended up with swagger to generate confusing yml file where enum field is besides items field.

      See https://community.atlassian.com/forums/Jira-articles/Generating-a-REST-client-for-Jira-Cloud/bc-p/3066880#M19589 for more context.

      Steps to Reproduce

      Generate swagger doc based on Jira code using

          <groupId>org.openapitools</groupId>
          <artifactId>openapi-generator-maven-plugin</artifactId> 

      Expected Results

      No enum field besides items.

      exclude:
        description: "A list of roles that should be excluded as possible approvers."
        items:
          description: "A list of roles that should be excluded as possible approvers." 
      ...

       

      Actual Results

      enum field besides items.

      exclude:
        description: "A list of roles that should be excluded as possible approvers."
        enum:
           - "assignee"
           - "reporter"
        items:
          description: "A list of roles that should be excluded as possible approvers." 
      ...

      Workaround

      User to manually fix the swagger doc.

              Unassigned Unassigned
              84d764603f6b Jun Shao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: