-
Notifications
You must be signed in to change notification settings - Fork 8
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
serverless-openapi-documenter adaptation #45
base: main
Are you sure you want to change the base?
Conversation
Hey, sorry for spamming; maybe you can take a look into this? It seems pretty straight forward but I need some help to fix that test and use this. Thanks !! |
…enum[value] for API gateway
Request schema validators
c525cec
to
5fcd3d4
Compare
Hey @gdlin, is your fork up to date? If so, can you make a sample hello world application and show how it works end to end? |
It's working with serverless v2.73. I haven't tried it with v3 since I don't have the time at the moment. The tests were updated as well. I currently don't have much time available to create the hello world but I'll try to make something in the upcoming weeks. |
Hello,
I've found this plugin and wanted to pitch in by migrating it to work with serverless-openapi-documenter. The following changes were tested with serverless 2.x, node 16 and npm 8.5.
Plugin modifications
Test Modifications
documentation: ~
or the plugin will autogenerate the mock. You might want to change the text or the mock itself, I'll leave it in your hands.type: null
replaced fornullable: true
and certain parameters that were required such as empty descriptions if there is no description.headers: {}
. Updated the expected files accordingly.One thing I wasn't able to fix is that in the full test, there is an interface that is recursive. That is generating errors for a Circular Dependency, in the Converter. The conflicting code in the api.d.ts file is:
I've updated it to a string and it will pass all tests. Fixing this takes too much time that I don't really have at this moment, to be honest, I'm not exactly sure where the problem is and I can't seem to debug it easily.
Another thought, when validating the outputted schema with the online Swagger editor, it pointed out that there is no
version
parameter in the document. I don't think this is a problem with this plugin, but maybe check that if you can.NOTE: The pnpm lock file was not updated since I don't use it myself. I tried updating it, but it was a newer version and the changes were too many.