Invalid tables spec causes deserialization errors in the tables client.
Opened this issue · 0 comments
The tables specs state that the result of a api1.indexTableRowsSimple
request returns a List<Strings>
neon/packages/nextcloud/lib/src/api/tables/tables.openapi.json
Lines 3794 to 3908 in 1e1d403
But it actually returns a List<List<String>>
:
[
[
"What",
"How to do",
"Ease of use",
"Done"
],
[
"Open the tables app",
"Click on tables icon in the menu bar.",
5,
"true"
],
[
"Add your first row",
"Just click on \"new row\" and enter some data inside of the form. At the end click on the bottom \"save\".",
5,
"false"
],
[
"Edit a row",
"Hover the mouse over a row you want to edit. Click on the pen on the right side. Maybe you want to add a \"done\" status to this row.",
5,
"false"
],
[
"Add a new column",
"You can add, remove and adjust columns as you need it. Click on the three-dot-menu on the upper right of this table and choose \"create column\". Fill in the data you want, at least a title and column type.",
4,
"false"
],
[
"Read the docs",
"If you want to go through the documentation, this can be found here: https:\\/\\/github.com\\/nextcloud\\/tables\\/wiki",
3,
"false"
]
]
I don't think this is an issue in the openapi-extractor, as the typing of the relevant php code is also referring to a string[]
.
Opening an issue upstream to hopefully get it fixed soon.
https://github.com/nextcloud/tables/blob/5cc780ce4260c262e3b733f5cb9d7959a9262938/lib/Controller/Api1Controller.php#L1032-L1060
We might be able to patch the spec for now, but I'm not sure how many endpoints are affected by this issue.
Upstream issue:
nextcloud/tables#1367