Can we design different response code for the rest builder

Jamie Sammons, modified 3 Years ago. New Member Posts: 5 Join Date: 12/9/20 Recent Posts

Hello,

I am using the rest builder template for my application.

I want to design different error codes (like 500, 501, 502...)

responses:
        200:
          description: ""
          content:
            application/json:
              schema:
                  $ref: "#/components/schemas/GetWebInformationBoxes"
            application/xml:
              schema:
                  $ref: "#/components/schemas/GetWebInformationBoxes"
        500:
          description: ""
          content:
            application/json:
              schema:
                  $ref: "#/components/schemas/error500"
            application/xml:
              schema:
                  $ref: "#/components/schemas/error500"

But I am not able to achieve this.

Is it possible with the Liferay to do this? let me know if we can do any customization for this.

Thank you in Advance