`apic loopback:relation` is broken
Seems like regression (#952)
jisoos-mbp:ji jisoolee$ apic loopback:relation
? Select the model to create the relationship from: Message
? Relation type: has many
? Choose a model to create a relationship with: Message
? Enter the property name for the relation: (messages) xyzErrorError: undefined
jisoos-mbp:ji jisoolee$ apic loopback:relation
? Select the model to create the relationship from: Message
? Relation type: has many
? Choose a model to create a relationship with: Message
? Enter the property name for the relation: (messages) aefaefaefError: undefined
jisoos-mbp:ji jisoolee$
version info
apiconnect: v2.1.22 (API Connect: vdev)
apiconnect-cli-apis 2.1.10 (dda3613ccaa5f612e1336c372bf120a8adf0f87d)
apiconnect-cli-apps 2.1.10 (f7eee6e099a79ca24420bd505fd6208c55db2252)
apiconnect-cli-auth 2.1.22 (e7bec6b48bc6ee368c7e2b1439322cb809033f7a)
apiconnect-cli-catalogs 2.1.4 (0666081d4e223b96ce9b45f9da047d212d687b23)
apiconnect-cli-config 2.1.5 (e01f4d1578259eb357c804027dc10cc4d20a5ad0)
apiconnect-cli-create 2.1.9 (955513f53e0331adf7ccdd2747ef84a57eec5685)
apiconnect-cli-drafts 2.1.10 (d851d11ea809498bc0919b8b78cce8818e6f4696)
apiconnect-cli-edit 2.1.6 (c11b72d44a9e59ba96f98c92905d028d7748c42c)
apiconnect-cli-loopback 2.1.12 (1ad50561cd427f38752536f03a4d6825bfc30940)
apiconnect-cli-orgs 2.1.4 (43e1095fa047f50ceda63ad30ae44db660b5920c)
apiconnect-cli-pm 2.1.9 (ba11415ae7df38d6a8bc5daf4bfbb73d2f9513a4)
microgateway 1.2.6 (79409c78a338b88c4337a0ec5292e58b5bc88746)
flow-engine 1.0.10 (986fd0b33da6cd90a8d74d77960921ff1b0473fb)
apiconnect-cli-policies 1.1.5 (b9ba41d63b20c72549b3112691f5a70bc0503180)
apiconnect-cli-products 2.1.11 (ae85ae684e1a0064f61046c34866847f7c828e99)
apiconnect-cli-validate 2.1.7 (a1213e8d712da19dbe2c96c6aa59804e862c6279)
plugins 3.0.21
I reproduced this error on my local with latest apic, but it only fails with apic, generator-loopback works fine:
jannyHous-MacBook-Pro:relationagain jannyhou$ slc loopback:relation
? Select the model to create the relationship from: Message
? Relation type: has many
? Choose a model to create a relationship with: Message
? Enter the property name for the relation: xyz
? Optionally enter a custom foreign key:
? Require a through model? No
apic version:
jannyHous-MacBook-Pro:relationagain jannyhou$ apic --ext-version
apiconnect: v2.1.26 (API Connect: vdev)
apiconnect-cli-apis 2.1.14 (dda3613ccaa5f612e1336c372bf120a8adf0f87d)
apiconnect-cli-apps 2.1.15 (88a1d704ca4b6d4079887ecdfee06973de20fa4c)
apiconnect-cli-auth 2.1.27 (71a0faa7661556658c2ffec2ef8e75ea5d9c3a64)
apiconnect-cli-catalogs 2.1.5 (9e5737692eddfafee73686ec3d94c0610220cc33)
apiconnect-cli-config 2.1.5 (e01f4d1578259eb357c804027dc10cc4d20a5ad0)
apiconnect-cli-create 2.1.13 (955513f53e0331adf7ccdd2747ef84a57eec5685)
apiconnect-cli-drafts 2.1.13 (d851d11ea809498bc0919b8b78cce8818e6f4696)
apiconnect-cli-edit 2.1.10 (c11b72d44a9e59ba96f98c92905d028d7748c42c)
apiconnect-cli-loopback 2.1.16 (1ad50561cd427f38752536f03a4d6825bfc30940)
apiconnect-cli-orgs 2.1.4 (43e1095fa047f50ceda63ad30ae44db660b5920c)
apiconnect-cli-pm 2.1.14 (20d8fb2bdc5ee584ded04bb591c5cd16e65aed67)
microgateway 1.2.14 (eb168fec2c48b71dabd7477f5bc533242950b2df)
flow-engine 1.0.11 (3bd7074ef2da39e71691d082c9661290ead480e1)
apiconnect-cli-policies 1.1.10 (b9ba41d63b20c72549b3112691f5a70bc0503180)
apiconnect-cli-products 2.1.15 (ae85ae684e1a0064f61046c34866847f7c828e99)
apiconnect-cli-validate 2.1.12 (3f2a02dc680bb0b073eb1654ee669746daa41811)
plugins 3.0.26
generator-loopback version: The latest commit on master: https://github.com/strongloop/generator-loopback/tree/39e87991a1a5caf93daf8336c16f8421902cbd4c
I believe it's caused by missing https://github.com/strongloop/generator-loopback/commit/ba69e646cc0eeb3d16a78bf07b1e5c4064e01806 Will apply that commit again to fix it.
UPDATE: Please Ignore This Comment. It's wrong and get people confused. Sorry. @kraman Do you have idea which version of generator-loopback does apiconnect install from hursley 55501? It says 1.22.22 but actually it's not the latest code on master branch and it doesn't include this commit https://github.com/strongloop/generator-loopback/commit/ba69e646cc0eeb3d16a78bf07b1e5c4064e01806 , which fixes the error. Thanks :)
"dist": {
"shasum": "1243e60f7da7ab8f867156e6812466a7eafad0dc",
"tarball": "http://apimdev1136.hursley.ibm.com:55501/generator-loopback/-/generator-loopback-1.22.22.tgz"
},
I am closing it since https://github.com/strongloop/generator-loopback/pull/212 merged.