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

Feat: default sorting #250

Merged
merged 11 commits into from
Jan 29, 2024
Merged

Feat: default sorting #250

merged 11 commits into from
Jan 29, 2024

Conversation

flower-of-the-bridges
Copy link
Member

Pull Request Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Description

This PR adds default sorting as described in issue #236

PR Checklist

  • The commit message follows our guidelines included in the CONTRIBUTING.md
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR introduce a breaking change?

  • [] Yes
  • No

The PR adds a new field defaultSorting on the collection configuration. The feature is opt-in, i.e. If no value is provided, natural order of MongoDB will be used instead for sorting.

@flower-of-the-bridges flower-of-the-bridges linked an issue Jan 18, 2024 that may be closed by this pull request
lib/model.jsonschema.js Outdated Show resolved Hide resolved
@danibix95
Copy link
Collaborator

Could you please add the defaultSorting parameter here in the other type of collection definition model? https://github.com/mia-platform/crud-service/blob/main/lib/model.jsonschema.js#L478

@danibix95
Copy link
Collaborator

Hi! One last thing @flower-of-the-bridges: is it possible to update the documentation to explain the new parameter defaultSorting?
I believe this entails the README and maybe the Configuration page.

@flower-of-the-bridges
Copy link
Member Author

Hi! One last thing @flower-of-the-bridges: is it possible to update the documentation to explain the new parameter defaultSorting? I believe this entails the README and maybe the Configuration page.

Hi @danibix95 sure, thanks for the remainer! I've added the field on the README.md collection definition

@flower-of-the-bridges flower-of-the-bridges force-pushed the feat/default-sorting branch 2 times, most recently from 1a7bd28 to b880320 Compare January 19, 2024 15:07
@danibix95 danibix95 merged commit 4562761 into main Jan 29, 2024
10 checks passed
@danibix95 danibix95 deleted the feat/default-sorting branch January 29, 2024 13:21
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.

Define Default Sorting on collection
2 participants