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

Post generated method does not return the proper type

Description

    Example endpoint:

    "/sites/{siteId}/structured-contents/draft":
        # @review
        post:
            description:
                Creates a draft of a structured content
            operationId: postSiteStructuredContentDraft
            parameters:
                - in: path
                  name: siteId
                  required: true
                  schema:
                      format: int64
                      type: integer
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: "../../headless-delivery/headless-delivery-impl/rest-openapi.yaml#StructuredContent"
                    application/xml:
                        schema:
                            $ref: "../../headless-delivery/headless-delivery-impl/rest-openapi.yaml#StructuredContent"
            responses:
                200:
                    content:
                        application/json:
                            schema:
                                $ref: "../../headless-delivery/headless-delivery-impl/rest-openapi.yaml#StructuredContent"
                        application/xml:
                            schema:
                                $ref: "../../headless-delivery/headless-delivery-impl/rest-openapi.yaml#StructuredContent"
                    description:
                        ""
            tags: [ "StructuredContent" ]
    

    Rest builder generates the following method in the base class:

    public Response postSiteStructuredContentDraft(...)
    

    but the return type should be StructuredContent

    Attachments

      Activity

        People

          luismiguel.barco Luis Miguel Barcos
          luismiguel.barco Luis Miguel Barcos
          Kiyoshi Lee Kiyoshi Lee
          Luis Miguel Barcos Luis Miguel Barcos
          Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved:
            1 year, 33 weeks, 1 day ago

            Packages

              Version Package
              7.0.0 DXP FP99
              7.0.10.16 DXP SP16
              7.0.X
              7.1.10 DXP FP23
              7.1.10.6 SP6
              7.1.X
              7.2.10 DXP FP13
              7.2.X
              7.3.7 CE GA8
              7.3.10 DXP FP2
              7.3.X
              7.4.0 CE GA1 DXP 7,4
              7.4.1 CE GA2 DXP 7,4
              7.4.13 DXP GA1
              Master