cREST component and Swagger with context variable

Highlighted
Four Stars

cREST component and Swagger with context variable

we are using Talend ESB version 7.0.1

 

when using a context variable for the endpoint of a cREST component (as server) we cannot use the expose Swagger functionality. The code won't compile.

it throws the error "The method setBasePath(String) in the type AbstractSwaggerFeature is not applicable for the arguments ()"

 

it seems the code that would work is commented in the generated code:

// swagger2Feature_cREST_1.setBasePath(getCXFRSEndpointAddress(context.myEndpoint));
		swagger2Feature_cREST_1.setBasePath();

Is there any ways around this short of not using context variables here?

 

Thanks,

Florent

Tags (2)
Moderator

Re: cREST component and Swagger with context variable

Hello,

Would you mind posting your route setting screenshots on forum?

We have a similar jira issue about "Default endpoint URI not added to context variable endpoint in cRest". 

Here is the related jira link:https://jira.talendforge.org/browse/TESB-17083

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read