Trying to put together a simple REST API on a new server app and hitting a strange problem with one function.
I’ve defined it thus in the server:
[ROServiceMethod]
[ROCustom(‘HttpApiPath’,‘management/findcustomers/{searchname}’)]
[ROCustom(‘HttpApiMethod’,‘GET’)]
function FindCustomers(searchname : string) : Customers;
All compiles fine, however when I copy the generated Swagger API into editor.swagger.io, I get the above error, specifically on the first line of this block:
This also applies to the specific line that the Swagger editor is complaining about:
/management/findcustomers/{searchname}: {
If I change just this line to put the double-quotes around it, so it reads:
“/management/findcustomers/{searchname}”: {
Then it parses fine in the editor and it correctly prompts me to convert it to YAML.
The question is thus why does your JSON have these double-quotes whereas mine doesn’t. Is this an option somewhere or something that has been changed in an updated release? I’m on 1521.