Closed provokateurin closed 1 month ago
Usually it is fine to have a list as the top-level data structure and it makes sense in many cases, but if you ever need to extend it with something that is not part of the list you have to make a completely new and separate endpoint for it. For example if you have a pagination and want to return the cursor information in addition to the data, but previously you only returned the data. Since it is only a warning you are still free to ignore it.
Since it is only a warning you are still free to ignore it.
I kind of disagree. If there are too many warnings people will ignore the warnings and miss out on real warnings.
For example if you have a pagination and want to return the cursor information in addition to the data, but previously you only returned the data.
You could follow industry standard praxis and add a header for "next page"?
I still think it is better to avoid top-level lists, but I'm fine with not warning about it. Developers should know what they are doing :woman_shrugging:
Closes https://github.com/nextcloud/openapi-extractor/issues/136