For those of you that work with many/complex RESTl...
# suitescript
r
For those of you that work with many/complex RESTlets, do you keep example requests documented and if so, how?
p
Postman collections
👍 1
s
sometimes it doesnt hurt to have a comment of a sample json input within the restlet itself especially sometimes when you need to say differentiate whether it comes it as a string or as an int etc haha
👍 2
r
@PNJ - I like the Postman Collections idea but the only drawback is that it assumes everyone uses Postman. Personally, I use 'Insomnia' and have done just out of preference and had issues with exporting/importing. @Sciuridae54696d - I think having a comment with an example JSON could get very messy, very quickly IMO. I was considering creating a 'requests' dir and keeping example .jsons in there & also version controlled. There's also no right or wrong answer - just wanted to start a discussion and gather feedback.
p
I've just noticed that intellij and webstorm both support this out of the box, so I'm going to investigate that going forward (as I use both)
s
@Ryan J fair enough, for our restlets we have one custom record storing the integration Batch JSON, and a child record for each object the MR processes, in someway if you do have clients that don't have sandboxes, it's a way to debug the structure without having to initiate the suitelet? postman collections are great actually, and especially if you play with more difficult encryptions beyond NetSuite too, say AWS, the postman collection will help you through the authentication also... I think it can also save the response as examples too?
t
Postman is fairly sophisticated from what I have seen others do with it, chaining requests and using variables and such. Probably worth learning how to use the tool a bit.
r
I can chain requests and use env variables within Insomnia - I never stated I can't use Postman. Just a personal preference.
t
Insomnia actually looks like an interesting tool in that it also serves as a design tool
t
I have found the insomnia designer pretty useful for prototyping out the API so that myself and another dev could agree on it before I built the server side, and he built a client to integrate.