Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger docs don't show example request body #36

Open
KnowYourselves opened this issue Nov 10, 2021 · 0 comments
Open

Swagger docs don't show example request body #36

KnowYourselves opened this issue Nov 10, 2021 · 0 comments

Comments

@KnowYourselves
Copy link

Hello!

I have been having problems with the swagger documentation generated by this gem. Specifically the auto-generated swagger documentation doesn't show the body for the requests.

Version Information

  • OS: Windows 11, WSL2 with Ubuntu20.04
  • ruby: 2.7.4
  • node: 12.22.7
  • potassium: 6.4.0
  • power-api: 1.0.0

Steps to reproduce

  1. gem install potassium
  2. potassium create test-power-api
  3. App created with following options:
    image
  4. cd test-power-api
  5. bundle exec rails g model Banana size:float weight:float
  6. rake db:migrate
  7. bundle exec rails g power_api:controller Banana
  8. bundle exec rails rswag:specs:swaggerize
  9. bundle exec rails s
  10. Go to localhost:3000/api-docs

Expected result

The swagger documentation for POST /bananas should show an example body, for example, like the following documentation:

image
image

Actual result

The swagger documentation for POST /bananas doesn't show an example body:

image
image

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant