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

New Rule: No redundant required on @ApiProperty #139

Open
ChromeGG opened this issue Dec 31, 2023 · 1 comment
Open

New Rule: No redundant required on @ApiProperty #139

ChromeGG opened this issue Dec 31, 2023 · 1 comment

Comments

@ChromeGG
Copy link

In many codebases I see code like

@ApiProperty({
  required: true
  // other properties like description, example etc.
})

required: true is by default in @ApiProperty, no need to override it. It provides unnecessary complexity and it's just a boilerplate. As we already have api-property-matches-property-optionality it would be nice to have something like api-property-no-redundant-required. Or we can expand api-property-matches-property-optionality and add option like "no-redundant-required".

WDYT?

@darraghoriordan
Copy link
Owner

Hey, yea this sounds good. feel free to submit a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants