theoomoregbee / sails-hook-swagger-generator

A tool to help generate Swagger specification documentation based on OAS 3.0 for Sails APIs
MIT License
78 stars 33 forks source link

Unregconised shadow/implicit #76

Closed jayemfonacier closed 4 years ago

jayemfonacier commented 4 years ago

Encountering this issue.

image What seems to be the problem?

danielsharvey commented 4 years ago

It looks like there might be a problem analysing an association relationship. Are you able to give more information about the association in question?

jayemfonacier commented 4 years ago

Hi daniel,

Its a many-to-many relationship, here is the relationship between the two models,

User.js image

Permission.js image

jayemfonacier commented 4 years ago

Encountering this issue.

image What seems to be the problem?

Heres the entire issue api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids bound to middleware with unrecognised type 'BLUEPRINT: find' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: findone' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids bound to middleware with unrecognised type 'BLUEPRINT: create' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: update' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids/:id? bound to middleware with unrecognised type 'BLUEPRINT: destroy' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: update' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids/:parentid/group_permission_ids bound to middleware with unrecognised type 'BLUEPRINT: populate' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_permission_ids__permission_group_ids/:parentid/permission_group_ids bound to middleware with unrecognised type 'BLUEPRINT: populate' referencing unknown model group_permission_ids__permission_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids bound to middleware with unrecognised type 'BLUEPRINT: find' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: findone' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids bound to middleware with unrecognised type 'BLUEPRINT: create' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: update' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids/:id? bound to middleware with unrecognised type 'BLUEPRINT: destroy' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: update' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids/:parentid/group_user_ids bound to middleware with unrecognised type 'BLUEPRINT: populate' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /group_user_ids__user_group_ids/:parentid/user_group_ids bound to middleware with unrecognised type 'BLUEPRINT: populate' referencing unknown model group_user_ids__user_group_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids bound to middleware with unrecognised type 'BLUEPRINT: find' referencing unknown model permission_user_ids__user_permission_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: findone' referencing unknown model permission_user_ids__user_permission_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids bound to middleware with unrecognised type 'BLUEPRINT: create' referencing unknown model permission_user_ids__user_permission_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: update' referencing unknown model permission_user_ids__user_permission_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids/:id? bound to middleware with unrecognised type 'BLUEPRINT: destroy' referencing unknown model permission_user_ids__user_permission_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids/:id bound to middleware with unrecognised type 'BLUEPRINT: update' referencing unknown model permission_user_ids__user_permission_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids/:parentid/permission_user_ids bound to middleware with unrecognised type 'BLUEPRINT: populate' referencing unknown model permission_user_ids__user_permission_ids api_1 | warn: WARNING: sails-hook-swagger-generator: Ignoring unregconised shadow/implicit route /permission_user_ids__user_permission_ids/:parentid/user_permission_ids bound to middleware with unrecognised type 'BLUEPRINT: populate' referencing unknown model permission_user_ids__user_permission_ids

Just noticed there where other issues, but all of them share the same association that is many-to-many

danielsharvey commented 4 years ago

Would you please confirm the versions of:

jayemfonacier commented 4 years ago

hi its 1.2.4 for sails image

and ^3.1.2 for sails-hook-swagger-generator image

danielsharvey commented 4 years ago

Thanks. I will investigate some more.

jayemfonacier commented 4 years ago

Thanks. I will investigate some more.

ok thanks!

jayemfonacier commented 4 years ago

@danielsharvey, hi using through association instead of many-to-many association helped solve my problem. nonetheless, thanks!

danielsharvey commented 4 years ago

@jayemfonacier I'm glad you got it working.

I will still look into this more as I don't think the warnings should have occurred but I've not been able to reproduce as yet.

jayemfonacier commented 4 years ago

@danielsharvey, maybe its with the environment im working on, I wasn't able to reproduce the same errors when using just sails

danielsharvey commented 4 years ago

@jayemfonacier That is probably important. If you suspect/identify any feature/component/package that might affect this (in terms of reproducibility), let me know.

jayemfonacier commented 4 years ago

@danielsharvey, will do. thanks!