Order swagger's docs tags

This commit is contained in:
nicolas.dorier
2022-04-21 12:30:49 +09:00
parent 9bf3df1e87
commit 4dd41cffe3
4 changed files with 27 additions and 5 deletions

View File

@@ -135,6 +135,12 @@ namespace BTCPayServer.Controllers
var servers = new JArray();
servers.Add(new JObject(new JProperty("url", HttpContext.Request.GetAbsoluteRoot())));
json["servers"] = servers;
var tags = (JArray)json["tags"];
json["tags"] = new JArray(tags
.Select(o => (name: ((JObject)o)["name"].Value<string>(), o))
.OrderBy(o => o.name)
.Select(o => o.o)
.ToArray());
return Json(json);
}
[Route("docs")]

View File

@@ -92,5 +92,10 @@
"security": []
}
}
},
"tags": [
{
"name": "Authorization"
}
]
}

View File

@@ -554,7 +554,7 @@
},
"CreatePayoutRequest": {
"type": "object",
"properties":{
"properties": {
"destination": {
"type": "string",
"example": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
@@ -689,5 +689,16 @@
}
}
}
},
"tags": [
{
"name": "Pull payments (Management)"
},
{
"name": "Pull payments (Public)"
},
{
"name": "Pull payments payout (Public)"
}
]
}

View File

@@ -3,7 +3,7 @@
"/api/v1/stores/{storeId}/payment-methods/LNURL": {
"get": {
"tags": [
"Store Payment Methods (LNURL)"
"Store Payment Methods (LNURL Pay)"
],
"summary": "Get store LNURL payment methods",
"parameters": [