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

Option to skip type's attribute from toString #247

Closed
stojsavljevic opened this issue Apr 11, 2018 · 0 comments
Closed

Option to skip type's attribute from toString #247

stojsavljevic opened this issue Apr 11, 2018 · 0 comments
Labels
enhancement v2 Feature will be implemented in v2.0 only (master branch)

Comments

@stojsavljevic
Copy link
Contributor

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.

@stojsavljevic stojsavljevic added enhancement v2 Feature will be implemented in v2.0 only (master branch) labels Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement v2 Feature will be implemented in v2.0 only (master branch)
Projects
None yet
Development

No branches or pull requests

1 participant