TongchengOpenSource / smart-doc

Smart-doc is a java restful api document generation tool. Smart-doc is based on interface source code analysis to generate interface documentation, completely zero-injection.
https://smart-doc-group.github.io/#/
Apache License 2.0
1.43k stars 278 forks source link

feat: Fix the issue where the JsonValue annotation cannot be used on an enum. #910

Closed shalousun closed 2 months ago

shalousun commented 2 months ago
public enum TrainJobType {
    TRAIN_TENSORFLOW_JOB( "train-tensorflow-job"),
    TRAIN_PYTORCH_JOB("train-pytorch-job");

    private final String value;

    TrainJobType(String value) {
        this.value = value;
    }
    @JsonValue
    public String getValue() {
        return value;
    }
}