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

Cannot read property 'name' of undefined #56

Open
dylanAOA opened this issue Nov 21, 2019 · 1 comment
Open

Cannot read property 'name' of undefined #56

dylanAOA opened this issue Nov 21, 2019 · 1 comment

Comments

@dylanAOA
Copy link

dylanAOA commented Nov 21, 2019

We are receiving the following error. I believe this is due to circular references in the model. I also believe this is related to issue #13

To Reproduce:

Foo.ts:

@apimodel({
description: "Foo",
name: "Foo"
})
export class Foo {

@ApiModelProperty({
    description: 'Payment ID',
    required: true
})
id?: number;

@ApiModelProperty({
    description: 'Payment Token',
    required: true,
    model: 'Bar'
})
bar: Bar;

}

Bar.ts:

@apimodel({
description: "Bar",
name: "Bar"
})
export class Bar {

@ApiModelProperty({
    description: 'Payment ID',
    required: true
})
id?: number;

@ApiModelProperty({
    description: 'Payment Token',
    required: true,
    model: 'Foo'
})
foo: Foo;

}

Please assist. Thank you!

@dylanAOA
Copy link
Author

@olivierlsc Has this been looked into? I can provide more information if needed, thanks!

cardnetwork pushed a commit to cardnetwork/swagger-express-ts that referenced this issue Jan 6, 2020
cardnetwork pushed a commit to cardnetwork/swagger-express-ts that referenced this issue Jan 6, 2020
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

1 participant