Hi,
I'm using swagger-codegen-maven-plugin to generate the sources.
As the sources are generated mine IDE highlights an error in OAuth.java.
The issue is with the following rows:
return OAuthClientResponseFactory.createCustomResponse(
body,
contentType,
feignResponse.status(),
responseClass
);
Both declarations have more arguments:
public static <T extends OAuthClientResponse> T createCustomResponse(String body, String contentType, int responseCode, Map<String, List<String>> headers, Class<T> clazz) throws OAuthSystemException, OAuthProblemException {
OAuthClientResponse resp = (OAuthClientResponse)OAuthUtils.instantiateClassWithParameters(clazz, (Class[])null, (Object[])null);
resp.init(body, contentType, responseCode, headers);
return resp;
}
public static <T extends OAuthClientResponse> T createCustomResponse(InputStream body, String contentType, int responseCode, Map<String, List<String>> headers, Class<T> clazz) throws OAuthSystemException, OAuthProblemException {
OAuthClientResponse resp = (OAuthClientResponse)OAuthUtils.instantiateClassWithParameters(clazz, (Class[])null, (Object[])null);
if(body == null) {
body = new ByteArrayInputStream(new byte[0]);
}
2.2.1
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/test/resources/swagger/track.yaml</inputSpec>
<language>java</language>
<configOptions>
<sourceFolder>src/test/java/track/service/testSteps</sourceFolder>
<library>feign</library>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
mvn generate-sources
Just generate the sources.
I think, as a workaround, you can step the oltu client version down to 1.0.1
@leventatbjss, thanks for your comment.
You're right the issue was with library version.
Most helpful comment
I think, as a workaround, you can step the oltu client version down to 1.0.1