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

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

  •  
  •   unregister · Feb 11, 2023 · 1739 views
    This topic created in 1369 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
    nothingistrue
    Feb 11, 2023❤️1
    1
    一、ApiModelProperty.value 是可选的。

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