Closed hebrayah closed 1 year ago
Thank you for collaborating with the project by giving us feedback! Cheers!
HI @hebrayah, Can you please provide a use case about the situation you need such a feature? Because doesn't make anysense to modify the property building from the tool for only some special words. Keep in mind the code also generate Lombok annotated class you what you are suggesting is to generate something like
public class Something
....
private Boolean _new;
.....
so we should generate then get_New()
and set_New()
unless you want to we create special getter and setter for you unique case as getNew()
and setNew()
.
Please clarify.
HI @hebrayah,
I just was playing around a bit with this request... may you try the branch I created?
Cheers
Hello,
I have tried to replicate this issue on openapi-genearator. it handles this situation precisely the way i described, so:
Caused generation of:
public static final String JSON_PROPERTY_NEW = "new";
private GeographyRuleNew _new;
/**
* Get _new
* @return _new
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NEW)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public GeographyRuleNew getNew() {
return _new;
}
@JsonProperty(JSON_PROPERTY_NEW)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNew(GeographyRuleNew _new) {
this._new = _new;
}
Bear in mind that method _new can be already generated and has different meaning.
public GeographyRule _new(GeographyRuleNew _new) { this._new = _new; return this; }
I do think that this behavior is just a problem between a reserved wors lists in two languages - so it should not impact the shape of the interface itself.
Hi @hebrayah, had you a chance to try the branch associated to this issus?
Cheers
Hi
Sorry for that delay, U unfortunately i didnt have occasion to do that - however, as this is not PR but just new branch - I am not familiar with code itself to judge if changes are fine. I hope i described desired output as a business analyst ;)
Best regards marcin
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Nie zawiera wirusów.www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
czw., 5 paź 2023 o 10:18 Jose E. Garcia Maciñeiras @.***> napisał(a):
Hi @hebrayah https://github.com/hebrayah, had you a chance to try the branch associated to this issus?
Cheers
— Reply to this email directly, view it on GitHub https://github.com/sngular/scs-multiapi-plugin/issues/295#issuecomment-1748351723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECCXSCTKHHQUHX5FSS3YSLX5ZUNJAVCNFSM6AAAAAA5H6AJJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBYGM2TCNZSGM . You are receiving this because you were mentioned.Message ID: @.***>
Awesome, thanks for the update!
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Nie zawiera wirusów.www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
śr., 25 paź 2023 o 11:35 Jose E. Garcia Maciñeiras @.***> napisał(a):
Closed #295 https://github.com/sngular/scs-multiapi-plugin/issues/295 as completed via #296 https://github.com/sngular/scs-multiapi-plugin/pull/296.
— Reply to this email directly, view it on GitHub https://github.com/sngular/scs-multiapi-plugin/issues/295#event-10764777982, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECCXSDBR2K7ONMKLBNVWY3YBDMNXAVCNFSM6AAAAAA5H6AJJKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG43DINZXG44TQMQ . You are receiving this because you were mentioned.Message ID: @.***>
When AsyncAPI specificaiton file contain property named "new", causes Java file generation with property using reserved word - and generated files are not possible to compile. In such case generated java field should be _new or something like that ...