Skip to content

Feature/document api respond parameters #576

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

Merged

Conversation

Jibbarth
Copy link
Contributor

@Jibbarth Jibbarth commented Sep 2, 2018

Hello,

As discussed in Slack, I create this PR to document a little bit the _api_respond parameters. I added it in the events page, but I don't know if it's enough or should I add more info.

I also add a big part on the DTO page, to explain how use it without an ApiResource declared.

My initial need was to retrieve a Settings custom in my application, but I didn't think it was a good example.
I thought also to propose the retrievement of the kernel.environment parameter, but I didn't find it pertinent.
Finally, browsing the symfony/demo repository, I found the Locales list, so I based my example on it.
Let me know if the example is pertinent or not.

Thanks all of you for your awesome works !

@dunglas dunglas merged commit 8399e86 into api-platform:2.3 Oct 1, 2018
@dunglas
Copy link
Member

dunglas commented Oct 1, 2018

Thanks @Jibbarth. I made some slight modifications to the text. Such PRs are very appreciated!

dunglas added a commit to api-platform/website that referenced this pull request Oct 1, 2018
@Jibbarth Jibbarth deleted the feature/document-api_respond-parameters branch October 2, 2018 07:07
@dvc
Copy link
Contributor

dvc commented Nov 14, 2018

Typo:
public function __invoke(): LocalesDTO
should be
public function __invoke(): LocalesList

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants