Closed df-jsykes closed 10 years ago
Hi, it looks like your resource listing has some funny stuff in it. You look to be calling http://localhost/rest/app/_.json--can you please share the contents of that file?
Sure , sorry about that:
{
"apiVersion": "1.0",
"swaggerVersion": "1.1",
"basePath": "http://localhost/rest",
"apis": [
{
"path": "/user",
"description": "User Login"
},
{
"path": "/system",
"description": "System Configuration"
},
{
"path": "/app",
"description": "Storage for application files"
},
{
"path": "/db",
"description": "Local database access"
},
{
"path": "/doc",
"description": "Default storage for documents"
},
{
"path": "/dynamodb",
"description": "dynamo"
},
{
"path": "/eemail",
"description": null
},
{
"path": "/fsadfsadfadsf",
"description": "sadfadsfds"
},
{
"path": "/hotornot",
"description": "blah"
},
{
"path": "/lib",
"description": "Storage for library files shared by applications"
},
{
"path": "/myfolder",
"description": "myfolder"
},
{
"path": "/s3",
"description": "Amazon S3 Storage"
},
{
"path": "/schema",
"description": "Local database schema access"
},
{
"path": "/test",
"description": "test"
}
]
}```
Thanks--it looks as if the URL you put into the generator is pointing to /app
, but your resource listing doesn't show it. Maybe you put in a different URL into the generator? Can you point it to your resource listing?
Yes, sorry, I guess I was just trying different things to get it to work.
Here's what happens when I run that file:
[info] Running SwaggerDocGenerator http://localhost/app/swagger/_.json looking at base path http://localhost/rest calling: http://localhost/rest/user calling: http://localhost/rest/system calling: http://localhost/rest/app calling: http://localhost/rest/db calling: http://localhost/rest/doc calling: http://localhost/rest/dynamodb calling: http://localhost/rest/eemail calling: http://localhost/rest/fsadfsadfadsf calling: http://localhost/rest/hotornot calling: http://localhost/rest/lib calling: http://localhost/rest/myfolder calling: http://localhost/rest/s3 calling: http://localhost/rest/schema calling: http://localhost/rest/test ***** Failed to read swagger json! Error: Resource - apiVersion | missing required field Error: Resource - swaggerVersion | missing required field Error: Resource - basePath | missing required field
I stuck your JSON files behind a jetty web server and got this:
Do those left hand links work? That was the issue in my first post
On Aug 12, 2013, at 1:38 PM, Tony Tam notifications@github.com wrote:
I stuck your JSON files behind a jetty web server and got this:
— Reply to this email directly or view it on GitHub.
Yes--go to the project directory that contains the output folder (in my case, it's ./samples/docs/swagger-static-docs) and run "mvn jetty:run", then browse to http://localhost:8000
Thanks man, I'll see what's goin on on my side
On Aug 12, 2013, at 1:49 PM, Tony Tam notifications@github.com wrote:
Yes--go to the project directory that contains the output folder (in my case, it's ./samples/docs/swagger-static-docs) and run "mvn jetty:run", then browse to http://localhost:8000
— Reply to this email directly or view it on GitHub.
The files must be ok, since swaggerUI has never had a problem with them , correct?
We use swaggerUI on every deployment, here's one: https://dsp-go.cloud.dreamfactory.com/app/applications/swagger/index.html#!/doc
The codegen is more strict than the UI so that's not always the case. Can you give me the resource URL for the above, and I'll look to see why it's not generating?
We worked this out in the google group, closing the issue
running ./static-docs.sh returns this, noticed the scala error at the bottom, which may or may not be the main problem,but my docs only list the available operations on the left, clicking on one goes to the server root.
Detected sbt version 0.12.3 [info] Loading project definition from /Users/jasonsykes/Downloads/swagger-codegen-master/project [info] Set current project to swagger-codegen (in build file:/Users/jasonsykes/Downloads/swagger-codegen-master/) [warn] Credentials file /Users/jasonsykes/.ivy2/.credentials does not exist [info] Running SwaggerDocGenerator http://localhost/rest/app/_.json looking at base path http://localhost/rest calling: http://localhost/rest/app calling: http://localhost/rest/app/{container}/ WARNING! Unable to read API http://localhost/rest/app/{container}/ calling: http://localhost/rest/app/{container}/{file_path} WARNING! Unable to read API http://localhost/rest/app/{container}/{file_path} calling: http://localhost/rest/app/{container}/{folder_path}/ WARNING! Unable to read API http://localhost/rest/app/{container}/{folder_path}/ swagger version: 1.1 basePath: http://localhost/rest
api version: 1.0
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. wrote model samples/docs/swagger-static-docs/src/main/webapp/models/Containers.html wrote model samples/docs/swagger-static-docs/src/main/webapp/models/Folder.html wrote model samples/docs/swagger-static-docs/src/main/webapp/models/File.html wrote model samples/docs/swagger-static-docs/src/main/webapp/models/Container.html wrote model samples/docs/swagger-static-docs/src/main/webapp/models/FoldersAndFiles.html wrote api samples/docs/swagger-static-docs/src/main/webapp/operations/AppApi.html copied samples/docs/swagger-static-docs/pom.xml copied samples/docs/swagger-static-docs/src/main/webapp/assets/css/bootstrap-responsive.css copied samples/docs/swagger-static-docs/src/main/webapp/assets/css/bootstrap.css copied samples/docs/swagger-static-docs/src/main/webapp/assets/css/style.css copied samples/docs/swagger-static-docs/src/main/webapp/assets/images/logo.png copied samples/docs/swagger-static-docs/src/main/webapp/assets/js/bootstrap.js copied samples/docs/swagger-static-docs/src/main/webapp/assets/js/jquery-1.8.3.min.js copied samples/docs/swagger-static-docs/src/main/webapp/assets/js/main.js wrote samples/docs/swagger-static-docs/src/main/webapp/index.html java.lang.InterruptedException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at scala.tools.nsc.util.WorkScheduler.waitForMoreWork(WorkScheduler.scala:16) at scala.tools.nsc.interactive.PresentationCompilerThread$$anonfun$run$1.apply$mcZ$sp(PresentationCompilerThread.scala:21) at scala.tools.nsc.io.NullLogger$.logreplay(Replayer.scala:38) at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:21)
here is the json: