swagger-api/swagger-node

swagger project edit cannot get /

mohitmutha opened this issue · 13 comments

Running swagger version 0.7.5

Steps to reproduce

  1. Create a new project with swagger project create profiles
  2. Select express as the framework
  3. Project is created successfully
  4. Run swagger project edit profiles
  5. Browser page opens up with message Cannot GET /

Other way to reproduce
After step 3
4. Run command cd profiles to browse into the project dir
5. Run swagger project edit
6. Browser page opens up with message Cannot GET /

Have tried to install the swagger-editor both locally in the project and globally but getting the same result as above.

Since there is no swagger-editor, an error may be occurring.
Please install it globally and try it.

nom - g install swagger-editor

or

yarn global add swagger-editor

I have already tried adding the swagger-editor locally as well as globally. Still getting the same error.

Windows users

For some versions of npm on Windows will have problems on the npm install step of swagger project create. They are related to a debug module on npm not being managed properly. The following steps should resolve this issue:

  1. In the project directory, execute the following commands:
  2. npm install yamljs
  3. npm install debug
  4. npm install swagger-tools

There is also a way to edit YAML with provided docker.

docker run --rm - d - p 80: 8080 swaggerapi / swagger - editor

This image also comes with the swagger-codegen function.
I gave up on building locally because desired JAVASE8 in the setting of swagger-codegen.

I faced the same issue, the problem is that config/default.yaml doesn't contain the item - swagger_params_parser under the section swagger_controllers:.
Adding it there fixed the issue for me.

It turns out that the current node release 0.7.5 doesn't provide the following patch 70846a6#diff-28fe2e29ccfb9685861115a451ee1626 yet, although it is two years old.
Very odd...all in all manual patching seems to be the only work-around for now.

Also the docs lack this line, so I have created an apposite pull request: #582

3\. npm install debug

This did not work for me. I am using a Mac

I faced the same issue, the problem is that config/default.yaml doesn't contain the item - swagger_params_parser under the section swagger_controllers:.
Adding it there fixed the issue for me.

Did not fix it for me.

Is this project maintained anymore ?

Any news on this?

Hi I face this issue. In my case I have solved by installing node v8.17.0 via nvm. I hope can help any one.

I still have the same issue, I am a mac user.