You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If you use any non-standard names for storage fields (e.g. _foo rather than just foo), @Attribute annotation on it silently gets ignored. However, since it's the getter that determines what gets delivered as resource properties, this is extremely difficult to notice. In other words, when you access /scim/MyTypeX/123, you get "foo": ... in the response as expected. But the attribute is not present in the response to /scim/Schemas/SCHEMA-URI-FOR-TYPE-X. Renaming field _foo to foo does fix this, but it is extremely unobvious.
Describe the solution you'd like
When the library scans for @Attribute, it should complain about annotations on fields with names it doesn't understand (i.e. that don't match property names). If not with exceptions (this would break backward compatibility, though maybe in this case it's worth it), then at least by logging a big fat warning that is easy to spot.
Describe alternatives you've considered
As I said, renaming does fix this, but 1) it is unobvious that renaming would be the fix; 2) it is difficult even to spot that something needs to be fixed.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
If you use any non-standard names for storage fields (e.g.
_foo
rather than justfoo
),@Attribute
annotation on it silently gets ignored. However, since it's the getter that determines what gets delivered as resource properties, this is extremely difficult to notice. In other words, when you access/scim/MyTypeX/123
, you get"foo": ...
in the response as expected. But the attribute is not present in the response to/scim/Schemas/SCHEMA-URI-FOR-TYPE-X
. Renaming field_foo
tofoo
does fix this, but it is extremely unobvious.Describe the solution you'd like
When the library scans for
@Attribute
, it should complain about annotations on fields with names it doesn't understand (i.e. that don't match property names). If not with exceptions (this would break backward compatibility, though maybe in this case it's worth it), then at least by logging a big fat warning that is easy to spot.Describe alternatives you've considered
As I said, renaming does fix this, but 1) it is unobvious that renaming would be the fix; 2) it is difficult even to spot that something needs to be fixed.
The text was updated successfully, but these errors were encountered: