def swagger_definition(self, base_path=None, **kwargs):
        """
        return a valid swagger spec, with the values passed.
        """
        return Swagger(
            {
                "info": Info(
                    {
                        key: kwargs.get(key, self.DEFAULT_INFO.get(key))
                        for key in Info.fields.keys()
                        if key in kwargs or key in self.DEFAULT_INFO
                    }
                ),
                "paths": self.paths,
                "swagger": "2.0",
                "basePath": base_path,
            }
        ).to_primitive()
def swagger_definition ( self , base_path = None , ** kwargs ) : return Swagger ( { "info" : Info ( { key : kwargs . get ( key , self . DEFAULT_INFO . get ( key ) ) for key in Info . fields . keys ( ) if key in kwargs or key in self . DEFAULT_INFO } ) , "paths" : self . paths , "swagger" : "2.0" , "basePath" : base_path , } ) . to_primitive ( )
return a valid swagger spec, with the values passed.