Closed bibiboss closed 10 months ago
Thank you for collaborating with the project by giving us feedback! Cheers!
Hello @jemacineiras I saw the tags you put, I use maven. I don't know if that's relevant for the issue.
Hi @bibiboss, nowadays when we build an Enum type we are using the literals you add in the enum part as Identifiers. So as standard java language some characters are not allow, like ´:´
what will be produced right now is something like
public enum Source {
urn:namespace:valid:namespace.specific
}
The solution here to support that kind of is build something like
public enum Source {
URN_NAMESPACE_VALID_NAMESPACE_SPECIFIC("urn:namespace:valid:namespace.specific")
private final String value;
Source(final String value) {
this.value = value;
}
public String getValue() {
return value;
}
}
That will work for you?
Cheers
Hello @jemacineiras
Yes :)
I think there is a list of char to check. On the top of my head I'm thinking about all specials char from regional keyboard (é
and è
for example), and other java-reserved chars.
Cheers
Hi @bibiboss ,
there is a fix in the branch attached to this issue. If you can test it and works for you, then I can merge it.
Cheers
Hello @jemacineiras
It works well!
Outside specials char like é
or ñ
that are transformed to _
, but since they might be refused in many protocols, I guess we can state that is more related to a non-blocking bug (that is basically aestetics 😄 ).
I'm not stuck on this anymore!
Thanks again for quick answer and fix!
Hello! First, I'm not sure to write correctly the issue, so I appologize for that. I'll try to be reactive if any information is missing.
It seems that the plugin does not support special char. So far I've been using
:
and.
. Both this char can be used in a urn definition (https://www.rfc-editor.org/rfc/rfc2141). While some of my messages exchanged through a bus have URNs inside, it seems that currently it is not possible.asyncapi.yml example
mvn configuration
Result: Failing compilation
cause:
Possible result: The piece of code could be generated like:
Best regards