Skip to content

docs: add missing yaml documentation in the default order section #1375

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

Conversation

johnkrovitch
Copy link
Contributor

Add missing yaml documentation in the default order section

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I just made some minor changes to make this more YAMLy.

# config/api/resources/Book.yaml
App\Entity\Book:
attributes:
order: { foo: ASC }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
order: { foo: ASC }
order:
foo: ASC

get_desc_custom:
method: get
path: custom_collection_desc_foos
order: {name: DESC}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
order: {name: DESC}
order:
name: DESC

get_asc_custom:
method: get
path: custom_collection_asc_foos
order: {name: ASC}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
order: {name: ASC}
order:
name: ASC

@alanpoulain alanpoulain force-pushed the docs/add-yaml-documentation-for-default-order branch from e3d652b to 9edb189 Compare June 23, 2021 12:44
@alanpoulain alanpoulain merged commit 7ea43d9 into api-platform:2.6 Jun 23, 2021
@alanpoulain
Copy link
Member

Thanks @johnkrovitch.

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