springdoc-openapi icon indicating copy to clipboard operation
springdoc-openapi copied to clipboard

enum Identify anomalies

Open FPEsocrter opened this issue 3 years ago • 1 comments

public enum WebProxyEnum { NO_PROXY, HTTP, HTTPS, SOCKS, SSH, ;

}

参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema

type | 可用值:NO_PROXY,HTTP,HTTPS,SOCKS,SSH |   | true | string

should be type | 可用值:0(NO_PROXY),1(HTTP),2(HTTPS),3(SOCKS)4,(SSH) |   | true | int

FPEsocrter avatar Sep 10 '23 12:09 FPEsocrter

This can be resolved.

  public enum WebProxyEnum {
    NO_PROXY("0"),
    HTTP("1"),
    HTTPS("2"),
    SOCKS("3"),
    SSH("4");

    private String code;

    WebProxyEnum(String code) {
      this.code = code;
    }

    @Override
    public String toString() {
      return code;
    }
  }

uc4w6c avatar Sep 16 '23 05:09 uc4w6c