adamcooke / staytus

💡 An open source solution for publishing the status of your services
http://staytus.co
MIT License
2.17k stars 284 forks source link

Open API docs? #355

Closed ChrisTG742 closed 3 years ago

ChrisTG742 commented 3 years ago

Hi there, sind we do not use ruby here, I wonder if the API follows some standard like Swaggers "OpenAPI" (https://swagger.io/specification/)? Or is there some swagger-like API description available somewhere? (For example, when to use GET, POST, PUT, ...) Thanks in advance! Chris

adamcooke commented 3 years ago

Staytus does not currently use any OpenAPI documentation. You can access the API docs at yourdomain.com/api/docs/v1 though.

ChrisTG742 commented 3 years ago

Thanks for the info, unfortunately this does not work for me. I'm getting {"status":"invalid-controller-or-action"} when I try to access this URL on my installation (Docker based). What am I doing wrong?

ChrisTG742 commented 3 years ago

This is a log dump of the request when I try to access /api/:

F, [2021-07-26T18:04:50.652934 #52] FATAL -- : [6d9c8d8f-78a1-45a3-bb08-bf51e4630c33] ActionController::RoutingError (No route matches [GET] "/api"): vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/show_exceptions.rb:30:incall' vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:38:in call_app' vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:inblock in call' vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in block in tagged' vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:26:intagged' vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in tagged' vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:incall' vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/request_id.rb:21:in call' vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:incall' vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/runtime.rb:18:in call' vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:120:in call' vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/sendfile.rb:113:incall' vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:518:in call' vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:165:incall' vendor/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/commonlogger.rb:31:in call' vendor/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/configuration.rb:225:incall' vendor/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/server.rb:578:in handle_request' vendor/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/server.rb:415:inprocess_client' vendor/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/server.rb:275:in block in run' vendor/bundle/ruby/2.3.0/gems/puma-3.6.2/lib/puma/thread_pool.rb:116:inblock in spawn_thread'