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

Error when generating Typegoose class field #127

Open
Luard opened this issue Jul 20, 2020 · 1 comment
Open

Error when generating Typegoose class field #127

Luard opened this issue Jul 20, 2020 · 1 comment

Comments

@Luard
Copy link

Luard commented Jul 20, 2020

Typegoose is the "wrapper" I have in a project in order to interact with mongoose.

I have some objects that references other objects and on Typegoose it has to be done adding Ref to the object, for example:

@prop({ ref: Car })
  public car?: Ref<Car>;

When generating the swagger.json with typescript-rest-swagger it is crashing. I guess it might happen with other external properties.

Is there any way to do this?

I had to use another dependency for swagger but I really like typescript-rest-swagger.

Typegoose Ref info: https://typegoose.github.io/typegoose/docs/api/types/ref-type/

@abdesselamXpack94
Copy link

abdesselamXpack94 commented Feb 9, 2022

I'm having a similar issue where it is not generating the docs because it doesn't find the referenced type of some property

Have you found any workaround for this?
Thanks.

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

No branches or pull requests

2 participants