Skip to content

Does not autogenerates after changing entity #857

@kalashnikovisme

Description

@kalashnikovisme

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions