def _setup_adapter(self, namespace, route_prefix):
        self.serializer = JSONAPI(self.sqla.Model, prefix='{}://{}{}'.format(self.app.config['PREFERRED_URL_SCHEME'], self.app.config['SERVER_NAME'], route_prefix))
        for view in views:
            method, endpoint = view
            pattern = route_prefix + endpoint.value
            name = '{}_{}_{}'.format(namespace, method.name, endpoint.name)
            view = self._generate_view(method, endpoint)
            self.app.add_url_rule(pattern + '/',
                                  name + '_slashed',
                                  view,
                                  methods=[method.name],
                                  strict_slashes=False)
            self.app.add_url_rule(pattern, name, view, methods=[method.name])
Initialize the serializer and loop through the views to generate them.
dataset/ETHPy150Open ColtonProvias/sqlalchemy-jsonapi/sqlalchemy_jsonapi/flaskext.py/FlaskJSONAPI._setup_adapter