Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8423

cxf-rt-rs-service-description-swagger ignores class level @Consumes and @Produces annotation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.2
    • Fix Version/s: None
    • Component/s: JAX-RS
    • Labels:
      None
    • Environment:

      org.apache.cxf:cxf-spring-boot-starter-jaxrs:3.4.1

      Spring Boot 2.3.5.RELEASE

    • Estimated Complexity:
      Unknown

      Description

      Setting a @javax.ws.rs.Consumes or @javax.ws.rs.Produces annotation on an interface applies the annotations to all methods.

       

      I am using  in a Spring Boot project.

       

      When I add the @Consumes and @Produces annotations to the interface, the generated swagger.json file does not contain a "consumes" and "produces" section for any method of the class.

       

      When I add the annotations to any methods directly, they contain the correct sections.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mksplg Markus Plangg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: