openapi-typescript-codegen
openapi-typescript-codegen copied to clipboard
Type conversion of model
Describe the bug The backend parameters are of type Long, while the API generated by OpenAPI is of type number. Reading Long type data and converting it to number type may result in accuracy loss. How to map Long type to string or bigint type when generating API in OpenAPI?
backend:
public class Question implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private Date createTime;
@TableLogic
private Integer isDelete;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
Code generated using OpenAPI:
export type Question = {
createTime?: string;
id?: number;
isDelete?: number;
updateTime?: string;
};
Hi @Natsumeaiovo, please see the README in this repository. If you'd like to open an issue, you're welcome to do so in Hey API