cancel
Showing results for 
Search instead for 
Did you mean: 

Error installing swagger locally

arjunrajas005
New Contributor

Error installing swagger locally

after the installation i get Index of / error when i try opening in the browser how overcome this issue

errr.jpg

Thanks in Advanced

7 REPLIES 7
joejoyce
Staff

Re: Error installing swagger locally

Hey @arjunrajas005. What exactly are you trying to install here? SwaggerHub on-prem? Swagger UI? Swagger Editor? More info will help me answer the question, thanks. 

arjunrajas005
New Contributor

Re: Error installing swagger locally

i am trying to install swagger editor locally in windows system

arjunrajas005
New Contributor

Re: Error installing swagger locally

@joejoyce can you please help me to setup the swagger editor and swagger UI locally in windows system

abonstrom
Staff

Re: Error installing swagger locally

Hi @arjunrajas005,

 

Could you describe the steps you took to get to where you are now? That would help us determine how to get you the expected results. 

 

Otherwise, here is a set of steps I wrote up the other day to download, install, and run the Swagger editor & UI locally:

 

Here’s how you can download and run the Swagger Editor locally. It’s not as simple as downloading a .exe file and running it, you’ll need to download it using git, compile it using Node/npm, and run it using npm again.

First you’ll need to make sure you have these installed on your machine:

  1. - Git
  2. - Node.js
  3. - Npm (Node Package Manager)

Node.js and npm can be downloaded here: https://nodejs.org/en/download/

Next, you’ll want to run these commands from your terminal/command prompt (be sure you run them in the folder where you want to run the Swagger Editor from as it will download all the files from GitHub):

 

git clone https://github.com/swagger-api/swagger-editor.git

cd swagger-editor

npm install

npm run build

npm start

 

You’ll know it’s ready to be used when you see a message like this:

 

Starting up http-server, serving ./

Available on:

http://127.0.0.1:3001

 

Once you see this message, simply put the 127.0.0.1:XYZ address into your browser and you should see the editor.

 

There is also a way to run the editor locally using a docker image. You can find the instructions to do that here: https://github.com/swagger-api/swagger-editor

 

Let us know if you have any more questions,

Alex

arjunrajas005
New Contributor

Re: Error installing swagger locally

thanks @abonstrom for yor help i have successfully installed swagger editor locally using docker and i an able to launch in browser http://localhost but how to use this in application i tried using this in postman i getting error as shown in below imageerror1.png

can you please help to overcome this

 

Thanks in advance

nmrao
Community Hero

Re: Error installing swagger locally

Yes, docker is easiest way in local machine get us going quick.


Regards,
Rao.
abonstrom
Staff

Re: Error installing swagger locally

Hi @arjunrajas005,

 

Just for our understanding, are you trying to make API calls from Postman to your Swagger editor instance? This would not work. The Swagger editor is an open source tool that is a combination of 3 parts: a text editor, an OAS YAML/JSON validator (to check your API meets OAS standards), and the Swagger UI. There is no functionality on the editor that would allow you to interface with it using API calls.

 

If you're looking for that functionality, I would suggest you take a look at SwaggerHub, specifically the auto-mocking feature. With SwaggerHub, you'd get the full Swagger editor, as well as a tool that spins up a virtual server so you can test your API definitions. You can read more about this feature in the link below:

https://support.smartbear.com/swaggerhub/docs/integrations/api-auto-mocking.html 

 

Let me know if you have any more questions,

Alex

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors