-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import Statement for BigDecimal/BigInteger not generated for responses #275
Comments
Hi, Thanks for reporting the bug. Only thing that is unclear to me is In case that fix doesn't work as you expect please reopen the issue or create new one. |
Hi Aleksander Sorry, the double is a copy/paste error. I already created a pull request for this issue. I used a different approach, which is most probably not as good as yours. BUT the tests can be reuses ;) Would you mind to add the tests from my pull request to your commit? Thanks, |
Hi @peyerroger Thank you very much for your #280 PR. Further, your change helped to discover and solve another bug - #281 I added 24 test cases to make sure we don't regress on this. I will reject your PR since I resolved the bug using your idea but I added something more generic ( |
Hi Aleksander Thanks for solving this issue so quickly. Not at all! The important thing is solving the issue. Doesn't matter which pull request gets integrated ;) Cheers, |
Import Statement for BigDecimal not generated if return type number and useBigDecimal=true
Example:
`#%RAML 1.0
title: Number as bigdecimal
version: 1.0
/lucky-number:
get:
description: Returns the winning number.
responses:
200:
body:
application/json:
type: number`
Actual:
`-----------------------------------com.gen.test.LuckyNumberClient.java-----------------------------------
package com.gen.test;
import org.springframework.http.ResponseEntity;
/**
*/
public interface LuckyNumberClient {
}
-----------------------------------com.gen.test.LuckyNumberClientImpl.java-----------------------------------
package com.gen.test;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
/**
*/
@component
public class LuckyNumberClientImpl
implements LuckyNumberClient
{
}
`
Expected:
-----------------------------------com.gen.test.LuckyNumberClient.java-----------------------------------
package com.gen.test;
import java.math.BigDecimal;
import org.springframework.http.ResponseEntity;
/**
*/
public interface LuckyNumberClient {
}
-----------------------------------com.gen.test.LuckyNumberClientImpl.java-----------------------------------
package com.gen.test;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
/**
*/
@component
public class LuckyNumberClientImpl
implements LuckyNumberClient
{
}
The text was updated successfully, but these errors were encountered: