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

List of children not shown #20

Closed
nickvergessen opened this issue Jan 24, 2024 · 5 comments
Closed

List of children not shown #20

nickvergessen opened this issue Jan 24, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@nickvergessen
Copy link
Member

Problematic controller:
https://github.com/nextcloud/spreed/blob/4c5128dc22af05217df9e9d044515dbf921e05dc/lib/Controller/ReactionController.php#L63

*@return DataResponse<Http::STATUS_OK|Http::STATUS_CREATED, array<string, TalkReaction[]>

Resulting data:
https://github.com/nextcloud/spreed/blob/bac9eb8652e009c8e13b52d0c6815bc0432740e0/openapi.json#L8496-L8504

                                            "properties": {
                                                "meta": {
                                                    "$ref": "#/components/schemas/OCSMeta"
                                                },
                                                "data": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": "array",
                                                        "items": {
                                                            "$ref": "#/components/schemas/Reaction"
                                                        }
                                                    }
                                                }
                                            }

The sample shows the details, but the schema is not visible in the main area:
grafik

Mostlikely an upstream bug again?

@nickvergessen
Copy link
Member Author

Any clever idea for a workaround how I could name sample "emojis" here or even add documentation about what the key of the array is?

@provokateurin
Copy link
Member

nextcloud/openapi-extractor#10 would make it possible to write comments inside type aliases. You'd have to define the response type as an alias, but then it will work.

@nickvergessen
Copy link
Member Author

That works for me

@provokateurin
Copy link
Member

But it needs to be implemented first

@provokateurin
Copy link
Member

image
In the latest version this is displayed correctly, can we close this?

@provokateurin provokateurin added the bug Something isn't working label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants