[
https://issues.apache.org/jira/browse/CAMEL-14746?focusedWorklogId=406842&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406842
]
ASF GitHub Bot logged work on CAMEL-14746:
------------------------------------------
Author: ASF GitHub Bot
Created on: 20/Mar/20 07:50
Start Date: 20/Mar/20 07:50
Worklog Time Spent: 10m
Work Description: dmvolod commented on pull request #3654: CAMEL-14746:
Additional specificationScheme validation
URL: https://github.com/apache/camel/pull/3654
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 406842)
Remaining Estimate: 0h
Time Spent: 10m
> camel-rest-swagger java.lang.IllegalArgumentException when Swagger
> specification don't have "scheme" object and get this specification by
> "file;" resource
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-14746
> URL: https://issues.apache.org/jira/browse/CAMEL-14746
> Project: Camel
> Issue Type: Bug
> Components: camel-rest-swagger
> Affects Versions: 2.25.0
> Reporter: Mikhail Lukyanov
> Assignee: Dmitry Volodin
> Priority: Minor
> Fix For: 3.2.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> *camelContext*
>
> _<?xml version="1.0" encoding="UTF-8"?>_
> _<beans xmlns="http://www.springframework.org/schema/beans"_
> _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"_
> _xsi:schemaLocation="http://camel.apache.org/schema/spring
> [http://camel.apache.org/schema/spring/camel-spring.xsd]
> [http://www.springframework.org/schema/beans]
> [http://www.springframework.org/schema/beans/spring-beans.xsd]">_
> _<camelContext id="mytestroute"
> xmlns="http://camel.apache.org/schema/spring" >_
> _<route>_
> _<from uri="direct:swaggerIn"/>_
> _<to
> uri="swagger*:file*:/C:/Users/wunsh/IdeaProjects/camel/components/camel-rest-swagger/src/test/resources/swagger1.json#downloadUsingGET"/>_
> _<to uri="mock:swaggerOut"/>_
> _</route>_
> _</camelContext>_
> _<bean id="swagger"
> class="org.apache.camel.component.rest.swagger.RestSwaggerComponent">_
> _<property name="componentName" value="http" />_
> _</bean>_
> _</beans>_
>
> *Swagger.json*
>
> _{_
> _"swagger": "2.0",_
> _"info": {_
> _"description": "Api Documentation",_
> _"version": "1.0",_
> _"title": "Api Documentation",_
> _"termsOfService": "urn:tos",_
> _"contact": {},_
> _"license": {_
> _"name": "Apache 2.0",_
> _"url": "http://www.apache.org/licenses/LICENSE-2.0"_
> _}_
> _},_
> _"host": "localhost:8182",_
> _"basePath": "/manager",_
> _"tags": [_
> _{_
> _"name": "Logs",_
> _"description": "API for logs"_
> _}_
> _],_
> _"paths": {_
> _"/api/log/download": {_
> _"get": {_
> _"tags": [_
> _"Работа с логами"_
> _],_
> _"summary": "Export",_
> _"operationId": "downloadUsingGET",_
> _"produces": [_
> _"*/*"_
> _],_
> _"responses": {_
> _"200": {_
> _"description": "OK"_
> _},_
> _"401": {_
> _"description": "Unauthorized"_
> _},_
> _"403": {_
> "description": "Forbidden"
> },
> "404":
> { "description": "Not Found" }
> },
> "deprecated": false
> }
> }
> }
> }
>
> *Error*
>
> {color:#de350b}Caused by: org.apache.camel.FailedToCreateProducerException:
> Failed to create Producer for endpoint:
> swagger://[file:/C:/Users/wunsh/IdeaProjects/camel/components/camel-rest-swagger/src/test/resources/swagger1.json%23downloadUsingGET|file:///C:/Users/wunsh/IdeaProjects/camel/components/camel-rest-swagger/src/test/resources/swagger1.json%23downloadUsingGET].
> Reason: java.lang.IllegalArgumentException: The endpoint is not of type:
> class org.apache.camel.component.http.HttpEndpoint but is:
> org.apache.camel.component.file.FileEndpointCaused by:
> org.apache.camel.FailedToCreateProducerException: Failed to create Producer
> for endpoint:
> swagger://[file:/C:/Users/wunsh/IdeaProjects/camel/components/camel-rest-swagger/src/test/resources/swagger1.json%23downloadUsingGET|file:///C:/Users/wunsh/IdeaProjects/camel/components/camel-rest-swagger/src/test/resources/swagger1.json%23downloadUsingGET].
> Reason: java.lang.IllegalArgumentException: The endpoint is not of type:
> class org.apache.camel.component.http.HttpEndpoint but is:
> org.apache.camel.component.file.FileEndpoint{color}
>
> {color:#172b4d}When I get the same swagger specification through the resource
> "http:" everything is ok{color}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)