mmontone / cl-rest-server

Serve REST APIs from Common Lisp
http://mmontone.github.io/cl-rest-server/cl-rest-server/
MIT License
66 stars 9 forks source link

`(rs.swagger:define-swagger-resource api)` does not work. #13

Open amherag opened 3 years ago

amherag commented 3 years ago

Hello

I defined an API following the example in demo/. I was able to successfully run the API and everything is working wonderfully. Then I followed the instructions from the documentation to generate the API documentation using Swagger and I'm getting an error. After executing:

(rs.swagger:define-swagger-resource api)

where api is the symbol's name I used to create the API with rest-server:define-api. I get the following error:

SWAGGER is not a valid api option

I'll keep looking into this, but I assume I'll help the community by documenting my issue and also maybe the community has already an answer to this problem and you can save me some hours of research and trial and error :D

mmontone commented 3 years ago

Hello Amaury,

the Swagger api documentation generator needs to be reviewed. I had something working at some point, but then I moved on to other things.

Also, this project documentation in general needs to be worked on, and you cannot rely on it at the moment. So, apologies. The source code is the true guide at this moment.

As for api docs, you can try this:

(start-api-documentation 'users-demo-api "localhost" 9096)

But they are very far from a Swagger docs .

amherag commented 3 years ago

Ah, I see. Thank you for your fast reply and for the help!

I'm not sure if you want this issue to remain open. I will let you decide that.