Home > Back-end >  Swagger doesn't recognize the backslash
Swagger doesn't recognize the backslash

Time:09-26

@ Data
@ ApiModel
Public class EditLightPlan implements Serializable {

@ ApiModelProperty (value="package name" https://bbs.csdn.net/topics/, example="XXXXX")
private String name;

@ JSONField (name="plan_id")
@ SerializedName (value="https://bbs.csdn.net/topics/plan_id")
@ JsonProperty (value="https://bbs.csdn.net/topics/plan_id")
@ ApiModelProperty (value="id" https://bbs.csdn.net/topics/scheme, example="")
Private String planId;

@ ApiModelProperty (value="https://bbs.csdn.net/topics/solution subordinate landscape lamp," example="[" A0003B \ ", \ "A0004B \]")
Private String [] towns;
}

CodePudding user response:

In the Java \ is to escape

CodePudding user response:

Yes, that's swagger in automatically generated when the document can't identify the escape character '\', this how to solve

CodePudding user response:

https://www.breakyizhan.com/swagger/2992.html#2

Try ~ 1

CodePudding user response:

refer to the second floor liuyouy response:
yes, swagger in automatically generated when the document can't identify the escape character '\', this how to solve the


Need to use escape characters need double "\ "
  • Related