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

Added expose to the Open API flavor by default #37

Conversation

joseceballos22
Copy link

Resolves HIP-29839.

Description:

In one of our libraries there exists a folder src/types which contains all the DTOs. As it currently stands the fields in the DTOs must explicitly list each field with the @expose decorator.

Therefore the purpose of this ticket is to modify @hippo-oss/nest-dto library , and make it so that by default it adds the @expose tag when using @hippo-oss/nest-dto/openapi decorators.

Checklist:

  • [ X] Manual tests (if the change relates to calling other services)

// we do not expect any data to be transformed
expect(Object.keys(obj)).toHaveLength(0);
// we expect the data to be transformed
expect(Object.keys(obj).length > 0).toEqual(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
expect(Object.keys(obj).length > 0).toEqual(true);
expect(Object.keys(obj)).toBeGreaterThan(0);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@jessemyers jessemyers merged commit 4a7573e into hippo-oss:main Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants