How to have multiple infinite objects without an array – Open API / Swagger

I'm trying to setup an open api spec for the following snippet of JSON:

                    "test1": {
                        "1739573957": {
                            "tester1": 123,
                            "tester2": "Company"
                        },
                        "64903826718": {
                            "tester1": 123,
                            "tester2": "Company"
                        }
                        "5902849189": {
                            "tester1": 123,
                            "tester2": "Company"
                        }
                    }

The objects inside test1 have randomized guids and are listed in a way that typically would be an array, but is not. There could potentially be an infinite number of objects inside test 1. Anyone know how to set this up?



Read more here: https://stackoverflow.com/questions/68459144/how-to-have-multiple-infinite-objects-without-an-array-open-api-swagger

Content Attribution

This content was originally published by Brandon Cormier at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: