theoomoregbee / sails-hook-swagger-generator

A tool to help generate Swagger specification documentation based on OAS 3.0 for Sails APIs
MIT License
78 stars 33 forks source link

cant fint any ./swagger folder or install is not creating it? #53

Closed ekumahost closed 5 years ago

ekumahost commented 5 years ago

after running npm install sails-hook... and http://localhost:1337/swagger/swagger.json is still hitting 404

how do I check the ./swagger/swagger.json for sample generated swagger documentation json? running current version of sails, v1.0

theoomoregbee commented 5 years ago

Just install the library and sails lift, the moment you do, that's all check your ./swagger folder, it should be there and make sure this folder is already existing.

you need to make sure the folder to place the generated swagger.json is already existing

And for exposing the swagger.json via a route like the one you specified: http://localhost:1337/swagger/swagger.json, you will need to update where the generated swagger.json folder should be. For your case, you need to specify the swagger folder(in the configuration) like so:

 { 
  ...
  swaggerJsonPath: "./assets/swagger/swagger.json"
  ...
}

related to https://github.com/theo4u/sails-hook-swagger-generator/issues/27