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

feature request: case insensitive of propeties #75

Open
K-e-l-v-i-n-12 opened this issue Aug 2, 2022 · 2 comments
Open

feature request: case insensitive of propeties #75

K-e-l-v-i-n-12 opened this issue Aug 2, 2022 · 2 comments

Comments

@K-e-l-v-i-n-12
Copy link

We use this library in conjunction with a Spring boot rest service. A DTO is available on the backend, which includes a Map<DayOfWeek, OwnClass>. The tag can come across the interface in upper and lower case. We have therefore set ACCEPT_CASE_INSENSITIVE_ENUMS.

Now, we need a similar behavior in the frontend. By default, the interface returns the DayOfWeek in upper case. However, our property in the resource is called e.g. monday. It would be nice if an anntoation was introduced with which I can set the property insensitive.

Example:
@HateoasResource('week')
export class Week extends Resource {
@insensitive
public monday: string;
}

@lagoshny
Copy link
Owner

lagoshny commented Aug 3, 2022

@K-e-l-v-i-n-12 ,

Do you mean, that you need to parse JSON like that?

"MONDAY": "value"

to your Resource:

public monday: string;

@K-e-l-v-i-n-12
Copy link
Author

yes, exactly :)

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

2 participants