We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Env: DB2 on IBMI whith loopback 4 fresh install
Command:
lb4 discover --models=XXXX
generate XXX.model.ts with invalid @Property:
@property({ type: 'string', required: true, jsonSchema: {nullable: false}, length: 15, generated: , <==================== INVALID })
The "generated" property has a value on "undefined" ...
I don't know if it is the best solution but for me the following correction fixes the problem:
File loopback/cli/lib/model-discoverer.js, line 89:
before:
// Delete the null properties so the template doesn't spit out `key: ;` if (v === null) { delete o[k]; }
after:
// Delete the null and undefined properties so the template doesn't spit out `key: ;` if (v === null || typeof v === 'undefined') { delete o[k]; }
stephane
src/models/b-2-butilpf.model.ts:211:16 - error TS1109: Expression expected. 211 generated: , ~ src/models/b-2-butilpf.model.ts:223:16 - error TS1109: Expression expected. 223 generated: , ~ src/models/b-2-butilpf.model.ts:233:16 - error TS1109: Expression expected. 233 generated: , ~ src/models/b-2-butilpf.model.ts:243:16 - error TS1109: Expression expected. 243 generated: , ~ src/models/b-2-butilpf.model.ts:253:16 - error TS1109: Expression expected. 253 generated: , ~ src/models/b-2-butilpf.model.ts:263:16 - error TS1109: Expression expected. 263 generated: ,
package.json dependencies:
"dependencies": { "@loopback/boot": "^6.1.2", "@loopback/core": "^5.1.2", "@loopback/repository": "^6.1.2", "@loopback/rest": "^13.1.2", "@loopback/rest-explorer": "^6.1.2", "loopback-connector-ibmi": "^1.0.1", "odbc": "^2.4.8", "tslib": "^2.0.0" }, "devDependencies": { "@loopback/testlab": "^6.1.2", "@types/mocha": "^10.0.1", "@types/node": "^16.18.40", "mocha": "^10.2.0", "rimraf": "^5.0.1", "source-map-support": "^0.5.21", "typescript": "~5.1.6" }
console output of one column property:
'type: string' 'required: true' 'jsonSchema: [object Object]' 'length: 1' 'precision: null' 'scale: null' 'generated: undefined' <============ undefined 'ibmi: [object Object]'
no AS400 available for reproduction :/
The text was updated successfully, but these errors were encountered:
Hi. This bug is happening after merging this PR of mine. I will make a PR soon to have it fixed.
Sorry, something went wrong.
This PR solves the issue. I am closing the issue.
No branches or pull requests
Describe the bug
Env: DB2 on IBMI whith loopback 4 fresh install
Command:
lb4 discover --models=XXXX
generate XXX.model.ts with invalid @Property:
The "generated" property has a value on "undefined" ...
I don't know if it is the best solution but for me the following correction fixes the problem:
File loopback/cli/lib/model-discoverer.js, line 89:
before:
after:
stephane
Logs
Additional information
package.json dependencies:
"dependencies": {
"@loopback/boot": "^6.1.2",
"@loopback/core": "^5.1.2",
"@loopback/repository": "^6.1.2",
"@loopback/rest": "^13.1.2",
"@loopback/rest-explorer": "^6.1.2",
"loopback-connector-ibmi": "^1.0.1",
"odbc": "^2.4.8",
"tslib": "^2.0.0"
},
"devDependencies": {
"@loopback/testlab": "^6.1.2",
"@types/mocha": "^10.0.1",
"@types/node": "^16.18.40",
"mocha": "^10.2.0",
"rimraf": "^5.0.1",
"source-map-support": "^0.5.21",
"typescript": "~5.1.6"
}
console output of one column property:
'type: string'
'required: true'
'jsonSchema: [object Object]'
'length: 1'
'precision: null'
'scale: null'
'generated: undefined' <============ undefined
'ibmi: [object Object]'
Reproduction
no AS400 available for reproduction :/
The text was updated successfully, but these errors were encountered: