OpenAPITools / OpenAPITools/openapi-generator
[BUG] kotlin-spring doesn't process xml.name(but java-spring does)
Open
Nobody has claimed this yet.
Issue: Bug
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
java-spring generated code like: (notice the @XmlRootElement annotation)
/**
* 微信支付结果通知响应报文
*/
@ApiModel(description = "微信支付结果通知响应报文")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")@JacksonXmlRootElement(localName = "xml")
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class WxPayNotifyRes implements Serializable {
// ...
}
kotlin-spring generated code like:
/**
* 微信支付结果通知响应报文
* @param returnCode SUCCESS/FAIL SUCCESS表示商户接收通知成功并校验成功
* @param returnMsg 返回信息,如非空,为错误原因: 签名失败 参数格式校验错误
*/
data class WxPayNotifyRes(
@field:JsonProperty("return_code", required = true) val returnCode: kotlin.String,
@field:JsonProperty("return_msg", required = true) val returnMsg: kotlin.String
) {
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the java-spring and kotlin-spring generators using the XML schema property described in the issue, starting with how each generator processes xml.name. Reproduce the generated models and verify that kotlin-spring emits the equivalent XML root metadata when xml.name is set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin, openapi, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100