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

chore: updating the AMF library #841

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jarrodek
Copy link
Contributor

@jarrodek jarrodek commented Nov 3, 2023

Potentially fixes #840

Changes made:

  • Updated AMF to 5.4.4 which triggered the following changes:
    • Updated the demo/demo-server/api/amf-service/amf-parser.js to match AMF's 5.x.x library structure
    • Updated other demo/demo-server/api/amf-service/*.js files to make the ESLint happy :)
    • Updated the .eslintrc.js to add override for node-run files in the demo folder.

Signed-off-by: Pawel Uchida-Psztyc <[email protected]>
@jarrodek jarrodek requested a review from a team as a code owner November 3, 2023 17:14
alexpmule
alexpmule previously approved these changes Nov 3, 2023
@rsukanya1013
Copy link

@jarrodek @alexpmule Thank you very much for the PR but I am still seeing the same issue.

@rsukanya1013
Copy link

Error: Expected OAS but could not find version header.
at ApiSearch._readApiType (/Users/sukanya/api-console/demo/demo-server/api/amf-service/api-search.js:138:15)
at async AmfService.parse (/Users/sukanya/api-console/demo/demo-server/api/amf-service/amf-service.js:219:20)
at async ApiParser.processBuffer (/Users/sukanya/api-console/demo/demo-server/api/api-parser.js:65:19)
at async ApiParser.parseFile (/Users/sukanya/api-console/demo/demo-server/api/api-parser.js:8:18)
at async apiRequest (/Users/sukanya/api-console/demo/demo-server/api.js:17:14)
at async demoApi (/Users/sukanya/api-console/demo/demo-server/api.js:41:5)
at async /Users/sukanya/api-console/node_modules/koa-compress/index.js:43:5
TypeError: Cannot read properties of undefined (reading '0')
at ApiParser._bufferIsZip (/Users/sukanya/api-console/demo/demo-server/api/api-parser.js:81:18)
at ApiParser.processBuffer (/Users/sukanya/api-console/demo/demo-server/api/api-parser.js:40:14)
at ApiParser.parseFile (/Users/sukanya/api-console/demo/demo-server/api/api-parser.js:8:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Signed-off-by: Pawel Uchida-Psztyc <[email protected]>
@jarrodek
Copy link
Contributor Author

jarrodek commented Nov 7, 2023

I added more chances to support OAS 3 in the demo page. @rsukanya1013 please mind that this is a part of a demo page used for internal development and it is not production quality code. Please, do not use in production. You can take a look and understand the logic, but you should consider writing your own AMF parser instance. The demo parser service was never tested or intended for production environment.

@rsukanya1013
Copy link

Sure thank you very much for your help here @jarrodek .

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

Successfully merging this pull request may close these issues.

OAS 3.0 not supported
3 participants