This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit dfe17fc7bf9dd9ca11de4edce6b69899b1de0f56 Author: Claus Ibsen <[email protected]> AuthorDate: Mon Jun 19 15:58:05 2023 +0200 CAMEL-17528: camel-core-model - <description> should be attribute --- .../OpenApiPetstoreWithRestComponentXml.txt | 27 ++++++++-------------- .../src/test/resources/OpenApiPetstoreXml.txt | 27 ++++++++-------------- .../OpenApiV3PetstoreWithRestComponentXml.txt | 27 ++++++++-------------- .../src/test/resources/OpenApiV3PetstoreXml.txt | 27 ++++++++-------------- 4 files changed, 36 insertions(+), 72 deletions(-) diff --git a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreWithRestComponentXml.txt b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreWithRestComponentXml.txt index 61c1888eedb..1e4ad5b28b2 100644 --- a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreWithRestComponentXml.txt +++ b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreWithRestComponentXml.txt @@ -11,18 +11,15 @@ <param dataType="boolean" defaultValue="false" description="Verbose data" name="verbose" required="false" type="query"/> <to uri="direct:addPet"/> </post> - <get id="findPetsByStatus" produces="application/xml,application/json" path="/pet/findByStatus"> - <description>Multiple status values can be provided with comma separated strings</description> + <get id="findPetsByStatus" description="Multiple status values can be provided with comma separated strings" produces="application/xml,application/json" path="/pet/findByStatus"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Status values that need to be considered for filter" name="status" required="true" type="query"/> <to uri="direct:findPetsByStatus"/> </get> - <get id="findPetsByTags" produces="application/xml,application/json" path="/pet/findByTags"> - <description>Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.</description> + <get id="findPetsByTags" description="Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." produces="application/xml,application/json" path="/pet/findByTags"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Tags to filter by" name="tags" required="true" type="query"/> <to uri="direct:findPetsByTags"/> </get> - <get id="getPetById" produces="application/xml,application/json" path="/pet/{petId}"> - <description>Returns a single pet</description> + <get id="getPetById" description="Returns a single pet" produces="application/xml,application/json" path="/pet/{petId}"> <param dataType="integer" description="ID of pet to return" name="petId" required="true" type="path"/> <to uri="direct:getPetById"/> </get> @@ -43,26 +40,22 @@ <param dataType="file" description="file to upload" name="file" required="false" type="formData"/> <to uri="direct:uploadFile"/> </post> - <get id="getInventory" produces="application/json" path="/store/inventory"> - <description>Returns a map of status codes to quantities</description> + <get id="getInventory" description="Returns a map of status codes to quantities" produces="application/json" path="/store/inventory"> <to uri="direct:getInventory"/> </get> <post id="placeOrder" produces="application/xml,application/json" path="/store/order"> <param description="order placed for purchasing the pet" name="body" required="true" type="body"/> <to uri="direct:placeOrder"/> </post> - <get id="getOrderById" produces="application/xml,application/json" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions</description> + <get id="getOrderById" description="For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions" produces="application/xml,application/json" path="/store/order/{orderId}"> <param dataType="integer" description="ID of pet that needs to be fetched" name="orderId" required="true" type="path"/> <to uri="direct:getOrderById"/> </get> - <delete id="deleteOrder" produces="application/xml,application/json" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors</description> + <delete id="deleteOrder" description="For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors" produces="application/xml,application/json" path="/store/order/{orderId}"> <param dataType="integer" description="ID of the order that needs to be deleted" name="orderId" required="true" type="path"/> <to uri="direct:deleteOrder"/> </delete> - <post id="createUser" produces="application/xml,application/json" path="/user"> - <description>This can only be done by the logged in user.</description> + <post id="createUser" description="This can only be done by the logged in user." produces="application/xml,application/json" path="/user"> <param description="Created user object" name="body" required="true" type="body"/> <to uri="direct:createUser"/> </post> @@ -86,14 +79,12 @@ <param dataType="string" description="The name that needs to be fetched. Use user1 for testing. " name="username" required="true" type="path"/> <to uri="direct:getUserByName"/> </get> - <put id="updateUser" produces="application/xml,application/json" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <put id="updateUser" description="This can only be done by the logged in user." produces="application/xml,application/json" path="/user/{username}"> <param dataType="string" description="name that need to be updated" name="username" required="true" type="path"/> <param description="Updated user object" name="body" required="true" type="body"/> <to uri="direct:updateUser"/> </put> - <delete id="deleteUser" produces="application/xml,application/json" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <delete id="deleteUser" description="This can only be done by the logged in user." produces="application/xml,application/json" path="/user/{username}"> <param dataType="string" description="The name that needs to be deleted" name="username" required="true" type="path"/> <to uri="direct:deleteUser"/> </delete> diff --git a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreXml.txt b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreXml.txt index 3c51257cb3e..0468f7e3a03 100644 --- a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreXml.txt +++ b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiPetstoreXml.txt @@ -10,18 +10,15 @@ <param dataType="boolean" defaultValue="false" description="Verbose data" name="verbose" required="false" type="query"/> <to uri="direct:addPet"/> </post> - <get id="findPetsByStatus" produces="application/xml,application/json" path="/pet/findByStatus"> - <description>Multiple status values can be provided with comma separated strings</description> + <get id="findPetsByStatus" description="Multiple status values can be provided with comma separated strings" produces="application/xml,application/json" path="/pet/findByStatus"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Status values that need to be considered for filter" name="status" required="true" type="query"/> <to uri="direct:findPetsByStatus"/> </get> - <get id="findPetsByTags" produces="application/xml,application/json" path="/pet/findByTags"> - <description>Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.</description> + <get id="findPetsByTags" description="Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." produces="application/xml,application/json" path="/pet/findByTags"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Tags to filter by" name="tags" required="true" type="query"/> <to uri="direct:findPetsByTags"/> </get> - <get id="getPetById" produces="application/xml,application/json" path="/pet/{petId}"> - <description>Returns a single pet</description> + <get id="getPetById" description="Returns a single pet" produces="application/xml,application/json" path="/pet/{petId}"> <param dataType="integer" description="ID of pet to return" name="petId" required="true" type="path"/> <to uri="direct:getPetById"/> </get> @@ -42,26 +39,22 @@ <param dataType="file" description="file to upload" name="file" required="false" type="formData"/> <to uri="direct:uploadFile"/> </post> - <get id="getInventory" produces="application/json" path="/store/inventory"> - <description>Returns a map of status codes to quantities</description> + <get id="getInventory" description="Returns a map of status codes to quantities" produces="application/json" path="/store/inventory"> <to uri="direct:getInventory"/> </get> <post id="placeOrder" produces="application/xml,application/json" path="/store/order"> <param description="order placed for purchasing the pet" name="body" required="true" type="body"/> <to uri="direct:placeOrder"/> </post> - <get id="getOrderById" produces="application/xml,application/json" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions</description> + <get id="getOrderById" description="For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions" produces="application/xml,application/json" path="/store/order/{orderId}"> <param dataType="integer" description="ID of pet that needs to be fetched" name="orderId" required="true" type="path"/> <to uri="direct:getOrderById"/> </get> - <delete id="deleteOrder" produces="application/xml,application/json" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors</description> + <delete id="deleteOrder" description="For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors" produces="application/xml,application/json" path="/store/order/{orderId}"> <param dataType="integer" description="ID of the order that needs to be deleted" name="orderId" required="true" type="path"/> <to uri="direct:deleteOrder"/> </delete> - <post id="createUser" produces="application/xml,application/json" path="/user"> - <description>This can only be done by the logged in user.</description> + <post id="createUser" description="This can only be done by the logged in user." produces="application/xml,application/json" path="/user"> <param description="Created user object" name="body" required="true" type="body"/> <to uri="direct:createUser"/> </post> @@ -85,14 +78,12 @@ <param dataType="string" description="The name that needs to be fetched. Use user1 for testing. " name="username" required="true" type="path"/> <to uri="direct:getUserByName"/> </get> - <put id="updateUser" produces="application/xml,application/json" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <put id="updateUser" description="This can only be done by the logged in user." produces="application/xml,application/json" path="/user/{username}"> <param dataType="string" description="name that need to be updated" name="username" required="true" type="path"/> <param description="Updated user object" name="body" required="true" type="body"/> <to uri="direct:updateUser"/> </put> - <delete id="deleteUser" produces="application/xml,application/json" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <delete id="deleteUser" description="This can only be done by the logged in user." produces="application/xml,application/json" path="/user/{username}"> <param dataType="string" description="The name that needs to be deleted" name="username" required="true" type="path"/> <to uri="direct:deleteUser"/> </delete> diff --git a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreWithRestComponentXml.txt b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreWithRestComponentXml.txt index 2816496bf41..457df54e7e1 100644 --- a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreWithRestComponentXml.txt +++ b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreWithRestComponentXml.txt @@ -9,18 +9,15 @@ <param description="Pet object that needs to be added to the store" name="body" required="true" type="body"/> <to uri="direct:addPet"/> </post> - <get id="findPetsByStatus" produces="application/xml,application/json" path="/pet/findByStatus"> - <description>Multiple status values can be provided with comma separated strings</description> + <get id="findPetsByStatus" description="Multiple status values can be provided with comma separated strings" produces="application/xml,application/json" path="/pet/findByStatus"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Status values that need to be considered for filter" name="status" required="true" type="query"/> <to uri="direct:findPetsByStatus"/> </get> - <get id="findPetsByTags" produces="application/xml,application/json" path="/pet/findByTags"> - <description>Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.</description> + <get id="findPetsByTags" description="Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." produces="application/xml,application/json" path="/pet/findByTags"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Tags to filter by" name="tags" required="true" type="query"/> <to uri="direct:findPetsByTags"/> </get> - <get id="getPetById" produces="application/xml,application/json" path="/pet/{petId}"> - <description>Returns a single pet</description> + <get id="getPetById" description="Returns a single pet" produces="application/xml,application/json" path="/pet/{petId}"> <param dataType="integer" description="ID of pet to return" name="petId" required="true" type="path"/> <to uri="direct:getPetById"/> </get> @@ -41,26 +38,22 @@ <param dataType="string" description="file to upload" name="file" required="true" type="formData"/> <to uri="direct:uploadFile"/> </post> - <get id="getInventory" produces="application/json" path="/store/inventory"> - <description>Returns a map of status codes to quantities</description> + <get id="getInventory" description="Returns a map of status codes to quantities" produces="application/json" path="/store/inventory"> <to uri="direct:getInventory"/> </get> <post consumes="*/*" id="placeOrder" produces="application/xml,application/json" path="/store/order"> <param description="order placed for purchasing the pet" name="body" required="true" type="body"/> <to uri="direct:placeOrder"/> </post> - <get id="getOrderById" produces="application/xml,application/json" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions</description> + <get id="getOrderById" description="For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions" produces="application/xml,application/json" path="/store/order/{orderId}"> <param dataType="integer" description="ID of pet that needs to be fetched" name="orderId" required="true" type="path"/> <to uri="direct:getOrderById"/> </get> - <delete id="deleteOrder" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors</description> + <delete id="deleteOrder" description="For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors" path="/store/order/{orderId}"> <param dataType="integer" description="ID of the order that needs to be deleted" name="orderId" required="true" type="path"/> <to uri="direct:deleteOrder"/> </delete> - <post consumes="*/*" id="createUser" path="/user"> - <description>This can only be done by the logged in user.</description> + <post consumes="*/*" id="createUser" description="This can only be done by the logged in user." path="/user"> <param description="Created user object" name="body" required="true" type="body"/> <to uri="direct:createUser"/> </post> @@ -84,14 +77,12 @@ <param dataType="string" description="The name that needs to be fetched. Use user1 for testing. " name="username" required="true" type="path"/> <to uri="direct:getUserByName"/> </get> - <put consumes="*/*" id="updateUser" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <put consumes="*/*" id="updateUser" description="This can only be done by the logged in user." path="/user/{username}"> <param dataType="string" description="name that need to be updated" name="username" required="true" type="path"/> <param description="Updated user object" name="body" required="true" type="body"/> <to uri="direct:updateUser"/> </put> - <delete id="deleteUser" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <delete id="deleteUser" description="This can only be done by the logged in user." path="/user/{username}"> <param dataType="string" description="The name that needs to be deleted" name="username" required="true" type="path"/> <to uri="direct:deleteUser"/> </delete> diff --git a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreXml.txt b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreXml.txt index 612c2cd2248..acf189cf08b 100644 --- a/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreXml.txt +++ b/tooling/openapi-rest-dsl-generator/src/test/resources/OpenApiV3PetstoreXml.txt @@ -9,18 +9,15 @@ <param description="Pet object that needs to be added to the store" name="body" required="true" type="body"/> <to uri="direct:addPet"/> </post> - <get id="findPetsByStatus" produces="application/xml,application/json" path="/pet/findByStatus"> - <description>Multiple status values can be provided with comma separated strings</description> + <get id="findPetsByStatus" description="Multiple status values can be provided with comma separated strings" produces="application/xml,application/json" path="/pet/findByStatus"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Status values that need to be considered for filter" name="status" required="true" type="query"/> <to uri="direct:findPetsByStatus"/> </get> - <get id="findPetsByTags" produces="application/xml,application/json" path="/pet/findByTags"> - <description>Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.</description> + <get id="findPetsByTags" description="Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." produces="application/xml,application/json" path="/pet/findByTags"> <param arrayType="string" collectionFormat="multi" dataType="array" description="Tags to filter by" name="tags" required="true" type="query"/> <to uri="direct:findPetsByTags"/> </get> - <get id="getPetById" produces="application/xml,application/json" path="/pet/{petId}"> - <description>Returns a single pet</description> + <get id="getPetById" description="Returns a single pet" produces="application/xml,application/json" path="/pet/{petId}"> <param dataType="integer" description="ID of pet to return" name="petId" required="true" type="path"/> <to uri="direct:getPetById"/> </get> @@ -41,26 +38,22 @@ <param dataType="string" description="file to upload" name="file" required="true" type="formData"/> <to uri="direct:uploadFile"/> </post> - <get id="getInventory" produces="application/json" path="/store/inventory"> - <description>Returns a map of status codes to quantities</description> + <get id="getInventory" description="Returns a map of status codes to quantities" produces="application/json" path="/store/inventory"> <to uri="direct:getInventory"/> </get> <post consumes="*/*" id="placeOrder" produces="application/xml,application/json" path="/store/order"> <param description="order placed for purchasing the pet" name="body" required="true" type="body"/> <to uri="direct:placeOrder"/> </post> - <get id="getOrderById" produces="application/xml,application/json" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions</description> + <get id="getOrderById" description="For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions" produces="application/xml,application/json" path="/store/order/{orderId}"> <param dataType="integer" description="ID of pet that needs to be fetched" name="orderId" required="true" type="path"/> <to uri="direct:getOrderById"/> </get> - <delete id="deleteOrder" path="/store/order/{orderId}"> - <description>For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors</description> + <delete id="deleteOrder" description="For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors" path="/store/order/{orderId}"> <param dataType="integer" description="ID of the order that needs to be deleted" name="orderId" required="true" type="path"/> <to uri="direct:deleteOrder"/> </delete> - <post consumes="*/*" id="createUser" path="/user"> - <description>This can only be done by the logged in user.</description> + <post consumes="*/*" id="createUser" description="This can only be done by the logged in user." path="/user"> <param description="Created user object" name="body" required="true" type="body"/> <to uri="direct:createUser"/> </post> @@ -84,14 +77,12 @@ <param dataType="string" description="The name that needs to be fetched. Use user1 for testing. " name="username" required="true" type="path"/> <to uri="direct:getUserByName"/> </get> - <put consumes="*/*" id="updateUser" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <put consumes="*/*" id="updateUser" description="This can only be done by the logged in user." path="/user/{username}"> <param dataType="string" description="name that need to be updated" name="username" required="true" type="path"/> <param description="Updated user object" name="body" required="true" type="body"/> <to uri="direct:updateUser"/> </put> - <delete id="deleteUser" path="/user/{username}"> - <description>This can only be done by the logged in user.</description> + <delete id="deleteUser" description="This can only be done by the logged in user." path="/user/{username}"> <param dataType="string" description="The name that needs to be deleted" name="username" required="true" type="path"/> <to uri="direct:deleteUser"/> </delete>
