Skip to content

Referencing self:: constants in annotations #269

@tbmatuka

Description

@tbmatuka

At the moment constant parsing doesn't read self:: constants and I have a use case where that would be the most practical solution:
I would like to pass serialization groups for a property that's defined in a trait. Since not all entities will have the same serialization groups for the properties in the traits, the only currently available options that I see is to either repeat the property definition in each entity or repeat the groups serialization definition for each property and each entity in yaml/xml.

I would have created a PR instead of an issue for this, but from what I see in the DocParser class, the only way to get the original class name would be to parse the context string, which seems like a bad idea. I'm hoping that someone more familiar with the codebase could do it in a cleaner way. If there isn't a better way, please let me know and I'll make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions