Skip to content

Option to skip type's attribute from toString #247

@stojsavljevic

Description

@stojsavljevic

In some cases certain attribute of data type might be sensitive so it should be excluded from toString method.

The only way to support this is to introduce custom annotation on type declaration that will mark fields as sensitive:

annotationTypes: 
  isSensitive:
    type: boolean
    allowedTargets: TypeDeclaration

types:
  User: # kind can equal `User`; default value for `discriminatorValue`
    type: object
    properties:
      userId:
        type: integer
      salary:
        type: integer
        (isSensitive): true

So, the plugin will recognize annotation called isSensitive and will skip annotated attribute from toString method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementv2Feature will be implemented in v2.0 only (master branch)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions