Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec formats items with multiple types as an array #1675

Closed
richvdh opened this issue Nov 16, 2023 · 2 comments
Closed

Spec formats items with multiple types as an array #1675

richvdh opened this issue Nov 16, 2023 · 2 comments
Labels
aesthetic A suggestion or issue relating to the representation of the spec

Comments

@richvdh
Copy link
Member

richvdh commented Nov 16, 2023

Link to problem area:
https://spec.matrix.org/unstable/client-server-api/#_matrixclientv3pushrules_pushcondition

Issue

image

It is not an array; rather it should be one of string, integer, null or boolean. In other parts of the spec (eg PushRule) we represent this with a | character. (Note that in the case of actions, it is actually an array of strings or objects, so the [] are correct in that case.)

@richvdh richvdh added the aesthetic A suggestion or issue relating to the representation of the spec label Nov 16, 2023
@richvdh
Copy link
Member Author

richvdh commented Nov 16, 2023

The source for this definition is here.
Per https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0, this "array of types" became valid in OpenAPI 3.1.0.

It looks like we need to update https://github.com/matrix-org/matrix-spec/blob/main/layouts/partials/openapi/render-object-table.html to handle it.

@zecakeh
Copy link
Contributor

zecakeh commented Apr 18, 2024

This was fixed by #1789.

@richvdh richvdh closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aesthetic A suggestion or issue relating to the representation of the spec
Projects
None yet
Development

No branches or pull requests

2 participants