code: def dispatch_request(self, *args, **kwargs):
          
          if self.validation:
              specs = {}
              attrs = flasgger.constants.OPTIONAL_FIELDS + [
                  'parameters', 'definitions', 'responses',
                  'summary', 'description'
              ]
              for attr in attrs:
                  specs[attr] = getattr(self, attr)
              definitions = {}
              specs.update(convert_schemas(specs, definitions))
              specs['definitions'] = definitions
              flasgger.utils.validate(
                  specs=specs, validation_function=self.validation_function)
          return super(SwaggerView, self).dispatch_request(*args, **kwargs)
docs: If validation=True perform validation