I'm trying to get an xml request body to display in Swagger UI. However, this is what I get:
This is the documentation I want:
<doc><members> ..... !--5. UpdCom1 -->
<br>
<member name="UpdCom1">
<summary>
5. 修改賽事資料1-基本資料 </summary>
<param name="ReqUpdCom1">
包含 許多比賽其本資料 格式如下:
<br></br>
<code>TID [string]</code> - 球隊編號
<br></br>
<code>CID [string]</code> - 賽事編號
<br></br>
<code>CName [string]</code> - 賽事名稱
<br></br>
<code>CType [int]</code> - 賽事類型
<br></br>
<code>CSubject [string]</code> - 比賽主旨
<br></br>
<code>Organizer1 [int]</code> - 主辦單位
<br></br>
<code>Organizer2 [string]</code> - 承辦單位
<br></br>
<code>Directed [int]</code> - 協辦單位
<br></br>
<code>Co_Organizer [int]</code> - 協辦單位
<br></br>
<code>CStartDate [string]</code> - 賽事開始日期
<br></br>
<code>CEndDate [string]</code> - 賽事結束日期
<br></br>
<code>FID1 [string]</code> - 第1球場編號/名稱
<br></br>
<code>Fairways1 [int]</code> - 道數1
<br></br>
<code>FID2 [string]</code> - 第2球場編號/名稱
<br></br>
<code>Fairways2 [int]</code> - 道數2
<br></br>
<code>Eligibility [string]</code> - 參賽資格
<br></br>
<remarks>
<para>Sample Request:</para>
<para>POST /Account/ReqUpdCom1</para>
<br></br>
{
<br></br>
"tid": "T2000010101",
<br></br>
"cid": "C2023121100001",
<br></br>
"cName": "測試比賽A
<br></br>
"cType": 1
<br></br>
"cSubject": "Test11
<br></br>
"organizer1": "Test22",
<br></br>
"organizer2": "Test33",
<br></br>
"directed": "Test44",
<br></br>
"co_Organizer": "Test55",
<br></br>
"cStartDate": "2023-12-21",
<br></br>
"cEndDate": "2023-12-22",
<br></br>
"fiD1": "F0001",
<br></br>
"fairways1": 12,
<br></br>
"fiD2": "",
<br></br>
"fairways2": 0,
<br></br>
"eligibility": "台北資格"
<br></br>
}
<br></br>
</remarks>
</param>
<returns>返回包含 State狀態 與 訊息</returns>
<response code="200">
回傳:
<para>
<c>state [string]</c> - 狀態
</para>
<para>
<c>Msg [string]</c> - 訊息
</para>
<remarks>
<para>
<b>Sample Status200 Responses:</b>
</para>
[
<br></br>
{
<br></br>
"state": "OK",
<br></br>
"msg": "修改成功~"
<br></br>
}
<br></br>
]
<br></br>
</response>
</member>
</members>
</doc>
Why does it created the all purple block like in the picture? Do I miss something? Feel free to ask any question if there is a doubt, Thanks before
I have anything API that code mostly the same as above but it displaying correctly like below picture (PictureB) As I also want my pictureA code looks like this
Your XML is not well-formed. To make it well-formed, make the following corrections:
<br>
tag.<remarks>
tag.Here's your XML with the previous corrections applied and with formatting adjustments:
<doc>
<members> ..... !--5. UpdCom1 -->
<br></br>
<member name="UpdCom1">
<summary>
5. 修改賽事資料1-基本資料 </summary>
<param name="ReqUpdCom1">
包含 許多比賽其本資料 格式如下:
<br></br>
<code>TID [string]</code> - 球隊編號
<br></br>
<code>CID [string]</code> - 賽事編號
<br></br>
<code>CName [string]</code> - 賽事名稱
<br></br>
<code>CType [int]</code> - 賽事類型
<br></br>
<code>CSubject [string]</code> - 比賽主旨
<br></br>
<code>Organizer1 [int]</code> - 主辦單位
<br></br>
<code>Organizer2 [string]</code> - 承辦單位
<br></br>
<code>Directed [int]</code> - 協辦單位
<br></br>
<code>Co_Organizer [int]</code> - 協辦單位
<br></br>
<code>CStartDate [string]</code> - 賽事開始日期
<br></br>
<code>CEndDate [string]</code> - 賽事結束日期
<br></br>
<code>FID1 [string]</code> - 第1球場編號/名稱
<br></br>
<code>Fairways1 [int]</code> - 道數1
<br></br>
<code>FID2 [string]</code> - 第2球場編號/名稱
<br></br>
<code>Fairways2 [int]</code> - 道數2
<br></br>
<code>Eligibility [string]</code> - 參賽資格
<br></br>
<remarks>
<para>Sample Request:</para>
<para>POST /Account/ReqUpdCom1</para>
<br></br>
{
<br></br>
"tid": "T2000010101",
<br></br>
"cid": "C2023121100001",
<br></br>
"cName": "測試比賽A
<br></br>
"cType": 1
<br></br>
"cSubject": "Test11
<br></br>
"organizer1": "Test22",
<br></br>
"organizer2": "Test33",
<br></br>
"directed": "Test44",
<br></br>
"co_Organizer": "Test55",
<br></br>
"cStartDate": "2023-12-21",
<br></br>
"cEndDate": "2023-12-22",
<br></br>
"fiD1": "F0001",
<br></br>
"fairways1": 12,
<br></br>
"fiD2": "",
<br></br>
"fairways2": 0,
<br></br>
"eligibility": "台北資格"
<br></br>
}
<br></br>
</remarks>
</param>
<returns>返回包含 State狀態 與 訊息</returns>
<response code="200">
回傳:
<para>
<c>state [string]</c> - 狀態
</para>
<para>
<c>Msg [string]</c> - 訊息
</para>
<remarks>
<para>
<b>Sample Status200 Responses:</b>
</para>
[
<br></br>
{
<br></br>
"state": "OK",
<br></br>
"msg": "修改成功~"
<br></br>
}
<br></br>
]
<br></br>
</remarks>
</response>
</member>
</members>
</doc>
If your application is sensitive to the indentation adjustments, then ignore this reformatted version of your XML and apply the described corrections directly to your copy as-is to correct the well-formedness problems alone.