-
Notifications
You must be signed in to change notification settings - Fork 76
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
NotImplementedError: Unexpected scenario where a(n) OpenBraceToken was not found. #673
Comments
@TylerLeonhardt thanks for reporting this issue. I'm currently investigating and will report back as soon as I get more information. |
@TylerLeonhardt I have merged a fix for the issue you reported. Would you mind trying to generate again using version |
@joheredi it looks like it generates but now it requires some kind of credential object?:
This API doesn't have any such token/credential (AFAIK) |
If you use the flag |
Something's still not right...
Now create a ts file here import { FdicBankDataAPIBeta } from './fdic.ts/dist/FdicBankDataAPIBeta'
// weird "options: any" as parameter
const myFDIC = new FdicBankDataAPIBeta(null);
myFDIC.searchInstitutions({
filters: "STALP:NC AND ACTIVE:1 AND CITY:Charlotte",
limit: 100
}).then(val => console.log(val.data)); and here's my package.json: {
"name": "fdic",
"author": "Microsoft Corporation",
"description": "FDICBankDataAPIBeta Library with typescript type definitions for node",
"version": "1.0.0",
"dependencies": {
},
"devDependencies": {
"typescript": "3.4.3"
},
"keywords": [
"node",
"azure"
],
"scripts": {
"compile": "tsc ./fdic-test.ts",
"start": "node ./fdic-test.js"
},
"license": "MIT",
"main": "./lib/fDICBankDataAPIBeta.js",
"homepage": "https://github.com/azure/azure-sdk-for-node",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-node.git"
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-node/issues"
}
} Using the nodejs generator, I got output from my TS file. Using the typescript generator, I do not get any. |
@TylerLeonhardt is the problem you're describing that your myFDIC
.searchInstitutions({
filters: "STALP:NC AND ACTIVE:1 AND CITY:Charlotte",
limit: 100,
})
.then((val) => console.log(val.data)); is logging const myFDIC = new FdicBankDataAPIBeta({
endpoint: "https://banks.data.fdic.gov/api/",
}); I see that As for the import { FdicBankDataAPIBeta } from "./fdic.ts"; |
const myFDIC = new FdicBankDataAPIBeta({
endpoint: "https://banks.data.fdic.gov/api/",
}); This worked! Also the import { FdicBankDataAPIBeta } from "./fdic.ts"; bit I still need to specify that endpoint in the ctor for it to actually work. |
@TylerLeonhardt thanks for reporting these issues. I'm investigating why the server url in the I'm going to close this issue as the original problem has been resolved, however feel free to follow the linked Issue, once that one is fixed you should be able to remove the endpoint in the constructor. |
@TylerLeonhardt I have merged a fix which should remove the necessity to pass |
Looks like it works :) thanks! |
btw this is related: |
I tried using the latest build today. It looks like generation isn't quite there yet for v3.
The YAML I used is here: https://github.com/TylerLeonhardt/AutoRest-PowerShell-Nodejs-Demo/blob/master/FDIC/fdic.yaml
The original YAML is here: https://banks.data.fdic.gov/docs/swagger.yaml
For now, I'll continue using the node.js generator.
The text was updated successfully, but these errors were encountered: