Hi
I’m writing a app that uses the Postman API directly to generate a Swift SDK to call apis I’ve imported/tested in Postman.
But I’m having problems distinguishing Top Level Items
e.g a Collection.Folder and a Collection.TopLevelRequest in the Collection.Item array.
Example in app I create:
Collection : “Collection1”
- Top Level Folder : FolderA
- Nested Request : Request1a
- Top Level Request : RequestB
The schema mentions Folders are item-group
http://schema.getpostman.com/json/collection/v2.0.0/collection.json
"item": {
“type”: “object”,
“title”: “Item”,
“item-group”: {
“title”: “Folder”,
“item”
But I can never get the api to return an item-group
only items nested in items.
I’m calling
https://api.getpostman.com/collections/8560808a-30d2-424e-5299-ba1cbd229ca8
Is this the right endpoint as response doesn’t need to match scheme collection.json
http://schema.getpostman.com/json/collection/v2.0.0/collection.json
Mixing Folders and Requests in item array mean parsing the json cant be done in one pass.
Can we add “scheme” to Folder and request items
Not following the scheme also means I cant generate the json model classes before running the api.
Also theres an issue with "url"
Sometimes its a String sometimes and Object split into “raw”/“path” etc.
It makes code generation difficult.
Code has to parse the api twice.
Cheers