File UID question
In the documentation available here I can read:
A single Swagger API file is considered as a unique REST File containing multiple APIs. The UID(Unique IDentifier) for the File is defined as the combination of host, basePath, info.title and info.version with / as separator.
What about the UID if the basePath is just /?
If basePathis is /, it would be ignored in uid.
The sample below would generate uid as microsoft.com/Contacts/1.6
{
"swagger": "2.0",
"info": {
"title": "Contacts",
"version": "1.6"
},
"host": "microsoft.com",
"basePath": "",
"schemes": [
"https"
]
}
Code logic is here GetUid.
Actually I have a / in basePath like in the following sample:
{
"swagger": "2.0",
"info": {
"title": "Contacts",
"version": "1.6"
},
"host": "microsoft.com",
"basePath": "/",
"schemes": [
"https"
]
}
and this would generate the following uid: microsoft.com//Contacts/1.6 (note the double forward slash).
As long as this will work for Overwrite Files I can live with it.