fsbahman / apidoc-swagger

apidoc and swagger are two nice projects which are focusing on documentation of APIs. This project is a middle tier which tries to bring them together in a sense that it uses apidoc to convert inline documentation to json schema and later convert it to swagger json schmea.
Other
252 stars 129 forks source link

apidoc-swagger command isn't working #7

Closed jbrauchler closed 8 years ago

jbrauchler commented 9 years ago

When I try to run the apidoc-swagger command with my api I am getting the error env: node\r: Not a directory I am following the apidoc commands and have had apidoc working properly so I am not sure what the issue is. Any help would be great.

fsbahman commented 9 years ago

Hi, You closed the issue, is it still there or you find a way around it? I was not around didn't have a time to look at it.

jbrauchler commented 9 years ago

I believe I got it working, but I had run it as apidoc swagger rather than apidoc-swagger. I just wasn't able to find the swagger Jason schema from there.

jbrauchler commented 9 years ago

I thought I had it working but it turns out I do not.

ramkumarc commented 9 years ago

I have the same issue as well. Command and response as given below

apidoc-swagger -i api/src/ -o public/docs/
: No such file or directory
shahzaibalikhan commented 9 years ago

Facing same issue here... any update on this?

jbrauchler commented 9 years ago

I still haven't found a fix I'm not sure where the error is and haven't heard anything from fsbahman.

jbrauchler commented 9 years ago

Honestly, I have just been using apidoc, I find that the format looks nicer using apidoc.

fsbahman commented 9 years ago

Hi, May I know how do you install it and how your directory structure look like?

This is a very simple way to see if it works:

  1. install apidoc-swagger: npm install apidoc-swagger -g
  2. cd into a directory with a file(s) you want to create documentation out of it. One remark, by default only known file extensions will be analyzed by apidoc like: *.js, *.c, *.java, *.cs
  3. just run apidoc-swagger without any parameters, it should create a sub directory doc containing a file swagger.json

Let me know if this is working for you.

jbrauchler commented 9 years ago

I attempted that, it does not work either.

On Mon, Jul 13, 2015 at 9:48 PM, Bahman notifications@github.com wrote:

Hi, May I know how do you install it and how your directory structure look like? This is a very simple way to see if it works:

  1. install apidoc-swagger: npm install apidoc-swagger -g
  2. cd into a directory with a file(s) you want to create documentation out of it. One remark, by default only known file extensions will be analyzed by apidoc like: .js, .c, .java, .cs
  3. just run apidoc-swagger without any parameters, it should create a sub directory called doc containing a file called swagger.json

Let me know if this is working for you.

— Reply to this email directly or view it on GitHub https://github.com/fsbahman/apidoc-swagger/issues/7#issuecomment-121125687 .

fsbahman commented 9 years ago

What kind of error did you get? Could you give me more information about the environment you are running your application?

jbrauchler commented 9 years ago

I got the same error as with parameters. I'm running on Mac, I am experienced with apidoc. That's really about it nothing special about my environment.

On Jul 13, 2015, at 11:20 PM, Bahman notifications@github.com wrote:

What kind of error did you get? Could you give me more information about the environment you are running your application?

— Reply to this email directly or view it on GitHub.

lfyzjck commented 9 years ago

I has the same problem on Mac. Perhaps the problem is file formating:

https://github.com/mllrsohn/nw-builder/issues/75

Just edit bin/apidocSwagger.js in vim and run set ff=unix.

nzoss commented 8 years ago

That indeed seems to be the issue. Resaving the file locally with unix line breaks worked file.

hareesh-blippar commented 8 years ago

The issue is with using windows newline characters (\r\n instead of \n) in the source file.

@fsbahman Could you update bin/apidocSwagger.js to use /n returns instead of /r/n returns ?

fsbahman commented 8 years ago

I'm using windows and tried to change line endings, after commit there is no history for them but it looks like changed. I've tried to download the package on my Ubuntu VM and it work fine, for now I don't have access to a mac to test it there as well. If someone had a look let me know if it is fine.

cadesalaberry commented 8 years ago

@fsbahman I think this issue can now be closed.

fsbahman commented 8 years ago

OK cool, thanks.

felipe-augusto commented 5 years ago

@fsbahman This issue is back in the new version (0.3.0), can you please check? I reverted to 0.2.2 and everything works fine.

fsbahman commented 5 years ago

@felipe-augusto Well actually version 0.3.0 is not directly related to previous versions. I created that one for the effort made by @kukicvladimir in this PR: https://github.com/fsbahman/apidoc-swagger/pull/5 since changes are a lot with so many conflicts and I didn't have time to merge it, I've decided to release it from the code that is not in the master branch, I expected some backward compatibility issues. I will try to bring nice fix and features from that branch to the main branch soon.