ecamp / ecamp/ecamp3

Improve OpenAPI examples of ToMany relations

Open
#3,006 0 comments 0 reactions 0 assignees View on GitHub
agents:ignore Good first issue
Dominant language
PHP
Stars
156
Forks
72
Avg merge
12h 43m
Merged PRs (30d)
203

Description

So far, we have specified the examples for ToMany relations like `example: '["/camp_collaborations/1a2b3c4d"]'`.
If we instead specify them as follows: `example: ['/camp_collaborations/1a2b3c4d']`, the swagger docs give a better description of reality. Compare the example for campCollaborations and for categories:
![Screenshot 2022-10-01 at 12-17-24 eCamp v3 - API Platform](https://user-images.githubusercontent.com/7566995/193404629-7be3c794-e65c-43b2-8cd9-c0c15741127e.png)

Also, [Camp#campCollaborations](https://github.com/ecamp/ecamp3/blob/devel/api/src/Entity/Camp.php#L60..L64) does not have any example and description (multiline comment) yet, we should add that.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.