class_docstr: The `Flask` object with some web API support.
  
  Examples:
  
  ```python
  from apiflask import APIFlask
  
  app = APIFlask(__name__)
  ```
  
  Attributes:
      openapi_version: The version of OpenAPI Specification (openapi.openapi).
          This attribute can also be configured from the config with the
          `OPENAPI_VERSION` configuration key. Defaults to `'3.0.3'`.
      servers: The servers information of the API (openapi.servers), accepts
          multiple server dicts. Example value:
  
          ```python
          app.servers = [
              {
                  'name': 'Production Server',
                  'url': 'http://api.example.com'
              }
          ]
          ```
  
          This attribute can also be configured from the config with the
          `SERVERS` configuration key. Defaults to `None`.
      tags: The list of tags of the OpenAPI spec documentation (openapi.tags),
          accepts a list of dicts. You can also pass a simple list contains the
          tag name:
  
          ```python
          app.tags = ['foo', 'bar', 'baz']
          ```
  
          A standard OpenAPI tags list will look like this:
  
          ```python
          app.tags = [
              {'name': 'foo', 'description': 'The description of foo'},
              {'name': 'bar', 'description': 'The description of bar'},
              {'name': 'baz', 'description': 'The description of baz'}
          ]
          ```
  
          If not set, the blueprint names will be used as tags.
  
          This attribute can also be configured from the config with the
          `TAGS` configuration key. Defaults to `None`.
      external_docs: The external documentation information of the API
          (openapi.externalDocs). Example:
  
          ```python
          app.external_docs = {
              'description': 'Find more info here',
              'url': 'http://docs.example.com'
          }
          ```
  
          This attribute can also be configured from the config with the
          `EXTERNAL_DOCS` configuration key. Defaults to `None`.
      info: The info object (openapi.info), it accepts a dict contains following info fields:
          `description`, `termsOfService`, `contact`, `license`. You can use separate
          configuration variables to overwrite this dict. Example:
  
          ```python
          app.info = {
              'description': '...',
              'termsOfService': 'http://example.com',
              'contact': {
                  'name': 'API Support',
                  'url': 'http://www.example.com/support',
                  'email': 'support@example.com'
              },
              'license': {
                  'name': 'Apache 2.0',
                  'url': 'http://www.apache.org/licenses/LICENSE-2.0.html'
              }
          }
          ```
  
      description: The description of the API (openapi.info.description).
          This attribute can also be configured from the config with the
          `DESCRIPTION` configuration key. Defaults to `None`.
      contact: The contact information of the API (openapi.info.contact). Example:
  
          ```python
          app.contact = {
              'name': 'API Support',
              'url': 'http://www.example.com/support',
              'email': 'support@example.com'
          }
          ```
  
          This attribute can also be configured from the config with the
          `CONTACT` configuration key. Defaults to `None`.
      license: The license of the API (openapi.info.license). Example:
  
          ```python
          app.license = {
              'name': 'Apache 2.0',
              'url': 'http://www.apache.org/licenses/LICENSE-2.0.html'
          }
          ```
  
          This attribute can also be configured from the config with the
          `LICENSE` configuration key. Defaults to `None`.
      terms_of_service: The terms of service URL of the API
          (openapi.info.termsOfService). Example:
  
          ```python
          app.terms_of_service = 'http://example.com/terms/'
          ```
  
          This attribute can also be configured from the config with the
          `TERMS_OF_SERVICE` configuration key. Defaults to `None`.
      security_schemes: The security schemes of the API
          (openapi.components.securitySchemes). Example:
  
          ```python
          app.security_schemes = [
              'ApiKeyAuth': {
                  'type': 'apiKey',
                  'in': 'header',
                  'name': 'X-API-Key'
              }
          ]
          ```
  
          This attribute can also be configured from the config with the
          `SECURITY_SCHEMES` configuration key. Defaults to `None`.
      spec_callback: It stores the function object registered by
          [`spec_processor`][apiflask.APIFlask.spec_processor]. You can also
          pass a callback function to it directly without using `spec_processor`.
          Example:
  
          ```python
          def update_spec(spec):
              spec['title'] = 'Updated Title'
              return spec
  
          app.spec_callback = update_spec
          ```
  
      error_callback: It stores the function object registered by
          [`error_processor`][apiflask.APIFlask.error_processor]. You can also
          pass a callback function to it directly without using `error_processor`.
          See the docstring of `error_processor` for more details.
          Example:
  
          ```python
          def my_error_handler(error):
              return {
                  'status_code': error.status_code,
                  'message': error.message,
                  'detail': error.detail
              }, error.status_code, error.headers
  
          app.error_processor = my_error_handler
          ```
  
      schema_name_resolver: It stores the function that used to decided the schema name.
          The schema name resolver should accept the schema object as argument and return
          the name.
          Example:
  
          ```python
          # this is the default schema name resolver used in APIFlask
          def schema_name_resolver(schema):
              name = schema.__class__.__name__  # get schema class name
              if name.endswith('Schema'):  # remove the "Schema" suffix
                  name = name[:-6] or name
              if schema.partial:  # add a "Update" suffix for partial schema
                  name += 'Update'
              return name
  
          app.schema_name_resolver = schema_name_resolver
          ```
  
  *Version changed: 1.0*
  
  - Add instance attribute `security_schemes` as an alias of config `SECURITY_SCHEMES`.
  
  *Version changed: 0.9.0*
  
  - Add instance attribute `schema_name_resolver`.
class_docstr_tok: ["The","`","Flask","`","object","with","some","web","API","support",".","Examples",":","``","`","python","from","apiflask","import","APIFlask","app","=","APIFlask","(","__name__",")","``","`","Attributes",":","openapi_version",":","The","version","of","OpenAPI","Specification","(","openapi.openapi",")",".","This","attribute","can","also","be","configured","from","the","config","with","the","`","OPENAPI_VERSION","`","configuration","key",".","Defaults","to","`","'","3.0.3","'","`",".","servers",":","The","servers","information","of","the","API","(","openapi.servers",")",",","accepts","multiple","server","dicts",".","Example","value",":","``","`","python","app.servers","=","[","{","'name","'",":","'Production","Server","'",",","'url","'",":","'http",":","\/\/api.example.com'","}","]","``","`","This","attribute","can","also","be","configured","from","the","config","with","the","`","SERVERS","`","configuration","key",".","Defaults","to","`","None","`",".","tags",":","The","list","of","tags","of","the","OpenAPI","spec","documentation","(","openapi.tags",")",",","accepts","a","list","of","dicts",".","You","can","also","pass","a","simple","list","contains","the","tag","name",":","``","`","python","app.tags","=","[","'foo","'",",","'bar","'",",","'baz","'","]","``","`","A","standard","OpenAPI","tags","list","will","look","like","this",":","``","`","python","app.tags","=","[","{","'name","'",":","'foo","'",",","'description","'",":","'The","description","of","foo","'","}",",","{","'name","'",":","'bar","'",",","'description","'",":","'The","description","of","bar","'","}",",","{","'name","'",":","'baz","'",",","'description","'",":","'The","description","of","baz","'","}","]","``","`","If","not","set",",","the","blueprint","names","will","be","used","as","tags",".","This","attribute","can","also","be","configured","from","the","config","with","the","`","TAGS","`","configuration","key",".","Defaults","to","`","None","`",".","external_docs",":","The","external","documentation","information","of","the","API","(","openapi.externalDocs",")",".","Example",":","``","`","python","app.external_docs","=","{","'description","'",":","'Find","more","info","here","'",",","'url","'",":","'http",":","\/\/docs.example.com'","}","``","`","This","attribute","can","also","be","configured","from","the","config","with","the","`","EXTERNAL_DOCS","`","configuration","key",".","Defaults","to","`","None","`",".","info",":","The","info","object","(","openapi.info",")",",","it","accepts","a","dict","contains","following","info","fields",":","`","description","`",",","`","termsOfService","`",",","`","contact","`",",","`","license","`",".","You","can","use","separate","configuration","variables","to","overwrite","this","dict",".","Example",":","``","`","python","app.info","=","{","'description","'",":","'","...","'",",","'termsOfService","'",":","'http",":","\/\/example.com","'",",","'contact","'",":","{","'name","'",":","'API","Support","'",",","'url","'",":","'http",":","\/\/www.example.com\/support","'",",","'email","'",":","'support","@","example.com'","}",",","'license","'",":","{","'name","'",":","'Apache","2.0","'",",","'url","'",":","'http",":","\/\/www.apache.org\/licenses\/LICENSE-2.0.html'","}","}","``","`","description",":","The","description","of","the","API","(","openapi.info.description",")",".","This","attribute","can","also","be","configured","from","the","config","with","the","`","DESCRIPTION","`","configuration","key",".","Defaults","to","`","None","`",".","contact",":","The","contact","information","of","the","API","(","openapi.info.contact",")",".","Example",":","``","`","python","app.contact","=","{","'name","'",":","'API","Support","'",",","'url","'",":","'http",":","\/\/www.example.com\/support","'",",","'email","'",":","'support","@","example.com'","}","``","`","This","attribute","can","also","be","configured","from","the","config","with","the","`","CONTACT","`","configuration","key",".","Defaults","to","`","None","`",".","license",":","The","license","of","the","API","(","openapi.info.license",")",".","Example",":","``","`","python","app.license","=","{","'name","'",":","'Apache","2.0","'",",","'url","'",":","'http",":","\/\/www.apache.org\/licenses\/LICENSE-2.0.html'","}","``","`","This","attribute","can","also","be","configured","from","the","config","with","the","`","LICENSE","`","configuration","key",".","Defaults","to","`","None","`",".","terms_of_service",":","The","terms","of","service","URL","of","the","API","(","openapi.info.termsOfService",")",".","Example",":","``","`","python","app.terms_of_service","=","'http",":","\/\/example.com\/terms\/'","``","`","This","attribute","can","also","be","configured","from","the","config","with","the","`","TERMS_OF_SERVICE","`","configuration","key",".","Defaults","to","`","None","`",".","security_schemes",":","The","security","schemes","of","the","API","(","openapi.components.securitySchemes",")",".","Example",":","``","`","python","app.security_schemes","=","[","'ApiKeyAuth","'",":","{","'type","'",":","'apiKey","'",",","'in","'",":","'header","'",",","'name","'",":","'","X-API-Key'","}","]","``","`","This","attribute","can","also","be","configured","from","the","config","with","the","`","SECURITY_SCHEMES","`","configuration","key",".","Defaults","to","`","None","`",".","spec_callback",":","It","stores","the","function","object","registered","by","[","`","spec_processor","`","]","[","apiflask.APIFlask.spec_processor","]",".","You","can","also","pass","a","callback","function","to","it","directly","without","using","`","spec_processor","`",".","Example",":","``","`","python","def","update_spec","(","spec",")",":","spec","[","'title","'","]","=","'Updated","Title'","return","spec","app.spec_callback","=","update_spec","``","`","error_callback",":","It","stores","the","function","object","registered","by","[","`","error_processor","`","]","[","apiflask.APIFlask.error_processor","]",".","You","can","also","pass","a","callback","function","to","it","directly","without","using","`","error_processor","`",".","See","the","docstring","of","`","error_processor","`","for","more","details",".","Example",":","``","`","python","def","my_error_handler","(","error",")",":","return","{","'status_code","'",":","error.status_code",",","'message","'",":","error.message",",","'detail","'",":","error.detail","}",",","error.status_code",",","error.headers","app.error_processor","=","my_error_handler","``","`","schema_name_resolver",":","It","stores","the","function","that","used","to","decided","the","schema","name",".","The","schema","name","resolver","should","accept","the","schema","object","as","argument","and","return","the","name",".","Example",":","``","`","python","#","this","is","the","default","schema","name","resolver","used","in","APIFlask","def","schema_name_resolver","(","schema",")",":","name","=","schema.__class__.__name__","#","get","schema","class","name","if","name.endswith","(","'Schema","'",")",":","#","remove","the","``","Schema","''","suffix","name","=","name","[",":","-6","]","or","name","if","schema.partial",":","#","add","a","``","Update","''","suffix","for","partial","schema","name","+=","'Update'","return","name","app.schema_name_resolver","=","schema_name_resolver","``","`","*","Version","changed",":","1.0","*","-","Add","instance","attribute","`","security_schemes","`","as","an","alias","of","config","`","SECURITY_SCHEMES","`",".","*","Version","changed",":","0.9.0","*","-","Add","instance","attribute","`","schema_name_resolver","`","."]
docstr: Register default error handlers for HTTPError and WerkzeugHTTPException.
  
  *Version changed: 0.9.0*
  
  - Always pass an `HTTPError` instance to error handlers.
docstr_tok: ["Register","default","error","handlers","for","HTTPError","and","WerkzeugHTTPException",".","*","Version","changed",":","0.9.0","*","-","Always","pass","an","`","HTTPError","`","instance","to","error","handlers","."]
code: def _register_error_handlers(self) -> None:
      """Register default error handlers for HTTPError and WerkzeugHTTPException.
  
      *Version changed: 0.9.0*
  
      - Always pass an `HTTPError` instance to error handlers.
      """
  
      @self.errorhandler(HTTPError)  # type: ignore
      def handle_http_errors(
          error: HTTPError,
      ) -> ResponseReturnValueType:
          return self.error_callback(error)
  
      if self.json_errors:
          self._apply_error_callback_to_werkzeug_errors()
  
imports: import inspect
  import json
  import re
  import typing
  import warnings
  from functools import wraps
  from apispec import APISpec
  from apispec import BasePlugin
  from apispec.ext.marshmallow import MarshmallowPlugin
  from flask import Blueprint
  from flask import Flask
  from flask import has_request_context
  from flask import jsonify
  from flask import render_template_string
  from flask import request
  from flask.config import ConfigAttribute
  from flask.wrappers import Response
  from werkzeug.exceptions import HTTPException
  from .exceptions import HTTPError
  from .exceptions import _bad_schema_message
  from .helpers import get_reason_phrase
  from .route import route_patch
  from .schemas import Schema
  from .schemas import FileSchema
  from .schemas import EmptySchema
  from .types import ResponseReturnValueType, ResponsesType
  from .types import ViewFuncType
  from .types import ErrorCallbackType
  from .types import SpecCallbackType
  from .types import SchemaType
  from .types import HTTPAuthType
  from .types import TagsType
  from .types import OpenAPISchemaType
  from .openapi import default_bypassed_endpoints
  from .openapi import default_response
  from .openapi import get_tag
  from .openapi import get_operation_tags
  from .openapi import get_path_summary
  from .openapi import get_auth_name
  from .openapi import get_argument
  from .openapi import get_security_and_security_schemes
  from .ui_templates import ui_templates
  from .ui_templates import swagger_ui_oauth2_redirect_template
  from .scaffold import APIScaffold
label_desc: Use image node_id 2 for calling the APIFlask obj's underlying member method code with example usage: obj._register_error_handlers() and returns: self