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

Generate an object to access json keys #1400

Closed
ChreSyr opened this issue Feb 19, 2024 · 2 comments
Closed

Generate an object to access json keys #1400

ChreSyr opened this issue Feb 19, 2024 · 2 comments

Comments

@ChreSyr
Copy link
Contributor

ChreSyr commented Feb 19, 2024

Hey !

It would be very nice to have a way to link the properties to their json keys. It would reduce the margin of error. For exemple, in my case, it would be for Firebase filters.

from : Filter('datetime_start', isGreaterThan: ...)
to : Filter(MyModel.jsonKeys.dateTimeStart, isGreaterThan: ...)

I know there already is the parameter 'create_field_map' which allows for Filter(MyModel.fieldMap['dateTimeStart'], isGreaterThan: ...) but it's safer to use properties instead of strings.

@ArthurREGNARD
Copy link

greate feature, need it !!

@aliaksei-liavonik
Copy link

That sounds good, also need it. To specify the list of fields for JSON_API-based server to return only needed fields, instead of listing all of the fields by hand from DTO objects

@kevmoo kevmoo closed this as completed in 5b46ef9 Mar 3, 2024
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

No branches or pull requests

3 participants