• 请不要在回答技术问题时复制粘贴 AI 生成的内容
unregister
V2EX  ›  程序员

好奇外国人怎么用 swagger 里面的 APIModelProperty 描述的?

  •  
  •   unregister · Feb 11, 2023 · 1364 views
    This topic created in 1210 days ago, the information mentioned may be changed or developed.

    就比如字段名称 name,难道注解上在加一个 ApiModelProperty(value ="name")在多写一遍吗

    2 replies    2023-02-11 16:37:50 +08:00
    nothingistrue
        1
    nothingistrue  
       Feb 11, 2023   ❤️ 1
    一、ApiModelProperty.value 是可选的。

    二、google style 和 老外的常见 style ,要求得是可选内容如果定义就必须有值,但可以不定义。
    unregister
        2
    unregister  
    OP
       Feb 11, 2023
    @nothingistrue 好的谢谢大佬解惑
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2425 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 15:59 · PVG 23:59 · LAX 08:59 · JFK 11:59
    ♥ Do have faith in what you're doing.