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

Does not autogenerates after changing entity #857

Open
kalashnikovisme opened this issue Mar 29, 2022 · 0 comments
Open

Does not autogenerates after changing entity #857

kalashnikovisme opened this issue Mar 29, 2022 · 0 comments

Comments

@kalashnikovisme
Copy link

kalashnikovisme commented Mar 29, 2022

Sorry guys, maybe I missed something important in the docs.

As I understood I should just add gem to a Gemfile, then add add_swagger_documentation method to my API class which is Grape::API inherited, and then MAGIC, it should autogenerate swagger.json file.

I've received legacy project with grape-swagger, grape-swagger-representable, grape-swagger-representable and rswag-ui gems and configuration.

Everything works fine until I change entities.

swagger.json is without any changes...

I didn't find how can I regenerated this file.

Could you please tell me, what should I do to get swagger.json updated.

class API::V4 < Grape::API
  # ...
   add_swagger_documentation(
      base_path: '/api',
      api_version: 'v4',
      hide_documentation_path: true,  
      doc_version: '4',
      api_key: 'something:something',
      mount_path: '/swagger_doc',
      security_definitions: {
           Authorization: {
               type: 'apiKey',
               name: 'Authorization',      
               in: 'header'
           }
       }
  )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant