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
The following commit(s) were added to refs/heads/main by this push:
new 88f5376 yaml-dsl: use camel-restdsl-openapi-plugin to generate rest
dsl from openapi spec (#5688)
88f5376 is described below
commit 88f537680579caee88588e2b472df287484f1774
Author: Luca Burgazzoli <[email protected]>
AuthorDate: Thu Jun 17 12:46:06 2021 +0200
yaml-dsl: use camel-restdsl-openapi-plugin to generate rest dsl from
openapi spec (#5688)
---
dsl/camel-yaml-dsl/camel-yaml-dsl/pom.xml | 19 +
.../org/apache/camel/dsl/yaml/RestTest.groovy | 13 +-
.../camel-yaml-dsl/src/test/resources/openapi.json | 1093 ++++++++++++++++++++
.../{generated-rest-dsl.yaml => rest-dsl.yaml} | 0
4 files changed, 1124 insertions(+), 1 deletion(-)
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/pom.xml
b/dsl/camel-yaml-dsl/camel-yaml-dsl/pom.xml
index 7dc1630..4907e0d 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/pom.xml
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/pom.xml
@@ -210,6 +210,25 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-restdsl-openapi-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>generate-dsl</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>generate-yaml</goal>
+ </goals>
+ <configuration>
+
<specificationUri>${project.basedir}/src/test/resources/openapi.json</specificationUri>
+
<outputDirectory>${project.build.outputDirectory}/rest-dsl</outputDirectory>
+ <fileName>generated-rest-dsl.yaml</fileName>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>${gmavenplus-plugin-version}</version>
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RestTest.groovy
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RestTest.groovy
index 6366395..737dd1a 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RestTest.groovy
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RestTest.groovy
@@ -168,9 +168,20 @@ class RestTest extends YamlTestSupport {
}
}
+ def "load rest (full)"() {
+ setup:
+ def rloc = 'classpath:/routes/rest-dsl.yaml'
+ def rdsl = context.resourceLoader.resolveResource(rloc)
+ when:
+ loadRoutes rdsl
+ then:
+ context.restDefinitions != null
+ !context.restDefinitions.isEmpty()
+ }
+
def "load rest (generated)"() {
setup:
- def rloc = 'classpath:/routes/generated-rest-dsl.yaml'
+ def rloc = 'classpath:/rest-dsl/generated-rest-dsl.yaml'
def rdsl = context.resourceLoader.resolveResource(rloc)
when:
loadRoutes rdsl
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/resources/openapi.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/resources/openapi.json
new file mode 100644
index 0000000..5804e02
--- /dev/null
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/resources/openapi.json
@@ -0,0 +1,1093 @@
+{
+ "openapi": "3.0.2",
+ "info": {
+ "title": "Swagger Petstore",
+ "version": "1.0.0",
+ "description": "This is a sample server Petstore server. You can find out
more about Swagger at [http://swagger.io](http://swagger.io) or on
[irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can
use the api key `special-key` to test the authorization filters.",
+ "termsOfService": "http://swagger.io/terms/",
+ "contact": {
+ "email": "[email protected]"
+ },
+ "license": {
+ "name": "Apache 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ },
+ "servers": [
+ {
+ "url": "http://petstore.swagger.io/api/v3"
+ }
+ ],
+ "paths": {
+ "/pet": {
+ "put": {
+ "requestBody": {
+ "description": "Pet object that needs to be added to the store",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ },
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "pet"
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid ID supplied"
+ },
+ "404": {
+ "description": "Pet not found"
+ },
+ "405": {
+ "description": "Validation exception"
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ],
+ "operationId": "updatePet",
+ "summary": "Update an existing pet",
+ "description": ""
+ },
+ "post": {
+ "requestBody": {
+ "description": "Pet object that needs to be added to the store",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ },
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "pet"
+ ],
+ "parameters": [
+ {
+ "name": "verbose",
+ "description": "Verbose data",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ },
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "405": {
+ "description": "Invalid input"
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ],
+ "operationId": "addPet",
+ "summary": "Add a new pet to the store",
+ "description": ""
+ }
+ },
+ "/pet/findByStatus": {
+ "get": {
+ "tags": [
+ "pet"
+ ],
+ "parameters": [
+ {
+ "style": "form",
+ "explode": true,
+ "name": "status",
+ "description": "Status values that need to be considered for
filter",
+ "schema": {
+ "type": "array",
+ "items": {
+ "default": "available",
+ "enum": [
+ "available",
+ "pending",
+ "sold"
+ ],
+ "type": "string"
+ }
+ },
+ "in": "query",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/xml": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ }
+ },
+ "description": "successful operation"
+ },
+ "400": {
+ "description": "Invalid status value"
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ],
+ "operationId": "findPetsByStatus",
+ "summary": "Finds Pets by status",
+ "description": "Multiple status values can be provided with comma
separated strings"
+ }
+ },
+ "/pet/findByTags": {
+ "get": {
+ "tags": [
+ "pet"
+ ],
+ "parameters": [
+ {
+ "style": "form",
+ "explode": true,
+ "name": "tags",
+ "description": "Tags to filter by",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "in": "query",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/xml": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ }
+ },
+ "description": "successful operation"
+ },
+ "400": {
+ "description": "Invalid tag value"
+ }
+ },
+ "deprecated": true,
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ],
+ "operationId": "findPetsByTags",
+ "summary": "Finds Pets by tags",
+ "description": "Muliple tags can be provided with comma separated
strings. Use tag1, tag2, tag3 for testing."
+ }
+ },
+ "/pet/{petId}": {
+ "get": {
+ "tags": [
+ "pet"
+ ],
+ "parameters": [
+ {
+ "name": "petId",
+ "description": "ID of pet to return",
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Pet"
+ }
+ }
+ },
+ "description": "successful operation"
+ },
+ "400": {
+ "description": "Invalid ID supplied"
+ },
+ "404": {
+ "description": "Pet not found"
+ }
+ },
+ "security": [
+ {
+ "api_key": []
+ }
+ ],
+ "operationId": "getPetById",
+ "summary": "Find pet by ID",
+ "description": "Returns a single pet"
+ },
+ "post": {
+ "requestBody": {
+ "content": {
+ "application/x-www-form-urlencoded": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Updated name of the pet",
+ "type": "string"
+ },
+ "status": {
+ "description": "Updated status of the pet",
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "pet"
+ ],
+ "parameters": [
+ {
+ "name": "petId",
+ "description": "ID of pet that needs to be updated",
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "405": {
+ "description": "Invalid input"
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ],
+ "operationId": "updatePetWithForm",
+ "summary": "Updates a pet in the store with form data",
+ "description": ""
+ },
+ "delete": {
+ "tags": [
+ "pet"
+ ],
+ "parameters": [
+ {
+ "name": "api_key",
+ "schema": {
+ "type": "string"
+ },
+ "in": "header",
+ "required": false
+ },
+ {
+ "name": "petId",
+ "description": "Pet id to delete",
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid ID supplied"
+ },
+ "404": {
+ "description": "Pet not found"
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ],
+ "operationId": "deletePet",
+ "summary": "Deletes a pet",
+ "description": ""
+ }
+ },
+ "/pet/{petId}/uploadImage": {
+ "post": {
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "additionalMetadata": {
+ "description": "Additional data to pass to server",
+ "type": "string"
+ },
+ "file": {
+ "format": "binary",
+ "description": "file to upload",
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "pet"
+ ],
+ "parameters": [
+ {
+ "name": "petId",
+ "description": "ID of pet to update",
+ "schema": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApiResponse"
+ }
+ }
+ },
+ "description": "successful operation"
+ }
+ },
+ "security": [
+ {
+ "petstore_auth": [
+ "write:pets",
+ "read:pets"
+ ]
+ }
+ ],
+ "operationId": "uploadFile",
+ "summary": "uploads an image",
+ "description": ""
+ }
+ },
+ "/store/inventory": {
+ "get": {
+ "tags": [
+ "store"
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "format": "int32",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "description": "successful operation"
+ }
+ },
+ "security": [
+ {
+ "api_key": []
+ }
+ ],
+ "operationId": "getInventory",
+ "summary": "Returns pet inventories by status",
+ "description": "Returns a map of status codes to quantities"
+ }
+ },
+ "/store/order": {
+ "post": {
+ "requestBody": {
+ "description": "order placed for purchasing the pet",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/Order"
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "store"
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/Order"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Order"
+ }
+ }
+ },
+ "description": "successful operation"
+ },
+ "400": {
+ "description": "Invalid Order"
+ }
+ },
+ "operationId": "placeOrder",
+ "summary": "Place an order for a pet",
+ "description": ""
+ }
+ },
+ "/store/order/{orderId}": {
+ "get": {
+ "tags": [
+ "store"
+ ],
+ "parameters": [
+ {
+ "name": "orderId",
+ "description": "ID of pet that needs to be fetched",
+ "schema": {
+ "format": "int64",
+ "maximum": 10,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/Order"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Order"
+ }
+ }
+ },
+ "description": "successful operation"
+ },
+ "400": {
+ "description": "Invalid ID supplied"
+ },
+ "404": {
+ "description": "Order not found"
+ }
+ },
+ "operationId": "getOrderById",
+ "summary": "Find purchase order by ID",
+ "description": "For valid response try integer IDs with value >= 1 and
<= 10. Other values will generated exceptions"
+ },
+ "delete": {
+ "tags": [
+ "store"
+ ],
+ "parameters": [
+ {
+ "name": "orderId",
+ "description": "ID of the order that needs to be deleted",
+ "schema": {
+ "format": "int64",
+ "minimum": 1,
+ "type": "integer"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid ID supplied"
+ },
+ "404": {
+ "description": "Order not found"
+ }
+ },
+ "operationId": "deleteOrder",
+ "summary": "Delete purchase order by ID",
+ "description": "For valid response try integer IDs with positive
integer value. Negative or non-integer values will generate API errors"
+ }
+ },
+ "/user": {
+ "post": {
+ "requestBody": {
+ "description": "Created user object",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "user"
+ ],
+ "responses": {
+ "default": {
+ "description": "successful operation"
+ }
+ },
+ "operationId": "createUser",
+ "summary": "Create user",
+ "description": "This can only be done by the logged in user."
+ }
+ },
+ "/user/createWithArray": {
+ "post": {
+ "requestBody": {
+ "description": "List of user object",
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "user"
+ ],
+ "responses": {
+ "default": {
+ "description": "successful operation"
+ }
+ },
+ "operationId": "createUsersWithArrayInput",
+ "summary": "Creates list of users with given input array",
+ "description": ""
+ }
+ },
+ "/user/createWithList": {
+ "post": {
+ "requestBody": {
+ "description": "List of user object",
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "user"
+ ],
+ "responses": {
+ "default": {
+ "description": "successful operation"
+ }
+ },
+ "operationId": "createUsersWithListInput",
+ "summary": "Creates list of users with given input array",
+ "description": ""
+ }
+ },
+ "/user/login": {
+ "get": {
+ "tags": [
+ "user"
+ ],
+ "parameters": [
+ {
+ "name": "username",
+ "description": "The user name for login",
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "required": true
+ },
+ {
+ "name": "password",
+ "description": "The password for login in clear text",
+ "schema": {
+ "type": "string"
+ },
+ "in": "query",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "headers": {
+ "X-Rate-Limit": {
+ "schema": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "description": "calls per hour allowed by the user"
+ },
+ "X-Expires-After": {
+ "schema": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "description": "date in UTC when token expires"
+ }
+ },
+ "content": {
+ "application/xml": {
+ "schema": {
+ "type": "string"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "successful operation"
+ },
+ "400": {
+ "description": "Invalid username/password supplied"
+ }
+ },
+ "operationId": "loginUser",
+ "summary": "Logs user into the system",
+ "description": ""
+ }
+ },
+ "/user/logout": {
+ "get": {
+ "tags": [
+ "user"
+ ],
+ "responses": {
+ "default": {
+ "description": "successful operation"
+ }
+ },
+ "operationId": "logoutUser",
+ "summary": "Logs out current logged in user session",
+ "description": ""
+ }
+ },
+ "/user/{username}": {
+ "get": {
+ "tags": [
+ "user"
+ ],
+ "parameters": [
+ {
+ "name": "username",
+ "description": "The name that needs to be fetched. Use user1 for
testing. ",
+ "schema": {
+ "type": "string"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/xml": {
+ "schema": {
+ "$ref": "#/components/schemas/User"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ },
+ "description": "successful operation"
+ },
+ "400": {
+ "description": "Invalid username supplied"
+ },
+ "404": {
+ "description": "User not found"
+ }
+ },
+ "operationId": "getUserByName",
+ "summary": "Get user by user name",
+ "description": ""
+ },
+ "put": {
+ "requestBody": {
+ "description": "Updated user object",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/User"
+ }
+ }
+ },
+ "required": true
+ },
+ "tags": [
+ "user"
+ ],
+ "parameters": [
+ {
+ "name": "username",
+ "description": "name that need to be updated",
+ "schema": {
+ "type": "string"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid user supplied"
+ },
+ "404": {
+ "description": "User not found"
+ }
+ },
+ "operationId": "updateUser",
+ "summary": "Updated user",
+ "description": "This can only be done by the logged in user."
+ },
+ "delete": {
+ "tags": [
+ "user"
+ ],
+ "parameters": [
+ {
+ "name": "username",
+ "description": "The name that needs to be deleted",
+ "schema": {
+ "type": "string"
+ },
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid username supplied"
+ },
+ "404": {
+ "description": "User not found"
+ }
+ },
+ "operationId": "deleteUser",
+ "summary": "Delete user",
+ "description": "This can only be done by the logged in user."
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "Order": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "petId": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "quantity": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "shipDate": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "status": {
+ "description": "Order Status",
+ "enum": [
+ "placed",
+ "approved",
+ "delivered"
+ ],
+ "type": "string"
+ },
+ "complete": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ "xml": {
+ "name": "Order"
+ }
+ },
+ "Category": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "xml": {
+ "name": "Category"
+ }
+ },
+ "User": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "username": {
+ "type": "string"
+ },
+ "firstName": {
+ "type": "string"
+ },
+ "lastName": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "userStatus": {
+ "format": "int32",
+ "description": "User Status",
+ "type": "integer"
+ }
+ },
+ "xml": {
+ "name": "User"
+ }
+ },
+ "Tag": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "xml": {
+ "name": "Tag"
+ }
+ },
+ "Pet": {
+ "required": [
+ "name",
+ "photoUrls"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "category": {
+ "$ref": "#/components/schemas/Category"
+ },
+ "name": {
+ "type": "string",
+ "example": "doggie"
+ },
+ "photoUrls": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "xml": {
+ "name": "photoUrl",
+ "wrapped": true
+ }
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Tag"
+ },
+ "xml": {
+ "name": "tag",
+ "wrapped": true
+ }
+ },
+ "status": {
+ "description": "pet status in the store",
+ "enum": [
+ "available",
+ "pending",
+ "sold"
+ ],
+ "type": "string"
+ }
+ },
+ "xml": {
+ "name": "Pet"
+ }
+ },
+ "ApiResponse": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "securitySchemes": {
+ "petstore_auth": {
+ "flows": {
+ "implicit": {
+ "authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
+ "scopes": {
+ "write:pets": "modify pets in your account",
+ "read:pets": "read your pets"
+ }
+ }
+ },
+ "type": "oauth2"
+ },
+ "api_key": {
+ "type": "apiKey",
+ "name": "api_key",
+ "in": "header"
+ }
+ }
+ },
+ "tags": [
+ {
+ "name": "pet",
+ "description": "Everything about your Pets",
+ "externalDocs": {
+ "description": "Find out more",
+ "url": "http://swagger.io"
+ }
+ },
+ {
+ "name": "store",
+ "description": "Access to Petstore orders"
+ },
+ {
+ "name": "user",
+ "description": "Operations about user",
+ "externalDocs": {
+ "description": "Find out more about our store",
+ "url": "http://swagger.io"
+ }
+ }
+ ],
+ "externalDocs": {
+ "description": "Find out more about Swagger",
+ "url": "http://swagger.io"
+ }
+}
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/resources/routes/generated-rest-dsl.yaml
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/resources/routes/rest-dsl.yaml
similarity index 100%
rename from
dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/resources/routes/generated-rest-dsl.yaml
rename to
dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/resources/routes/rest-dsl.yaml