You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Federico Mariani (Jira)" <ji...@apache.org> on 2023/04/20 15:25:00 UTC

[jira] [Created] (CAMEL-19284) camel-restdsl-openapi-plugin - Add type and outType to Rest DSL

Federico Mariani created CAMEL-19284:
----------------------------------------

             Summary: camel-restdsl-openapi-plugin - Add type and outType to Rest DSL
                 Key: CAMEL-19284
                 URL: https://issues.apache.org/jira/browse/CAMEL-19284
             Project: Camel
          Issue Type: New Feature
            Reporter: Federico Mariani


If _camel-restdsl-openapi-plugin_ is used to generate DTOs, it would be nice to have type(..) and outType(..) set on the Rest DSL.

ex.

{code:java}
rest("/v2")
            .put("/pet")
                .id("updatePet")
                .consumes("application/json,application/xml")
                .produces("application/xml,application/json")
                _.type(Pet.class)_
                .param()
                    .name("body")
                    .type(RestParamType.body)
                    .required(true)
                    .description("Pet object that needs to be added to the store")
                .endParam()
                .to("direct:updatePet")
{code}

given

{code:java}
...
"/pet": {
            "put": {
                "requestBody": {
                    "description": "Pet object that needs to be added to the store",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Pet"
                            }
                        },
...
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)