<commit_before>Routing
=======

Example:

.. code:: python

    from flask import Flask
    from flask_rest_jsonapi import Api

    from your_project.resources import TopicList, TopicDetail

    app = Flask(__name__)
    api = Api(app)

    api.list_route('topic_list', /topics', resource_cls=TopicList)
    api.detail_route('topic_detail', '/topics/<int:topic_id>', resource_cls=TopicDetail)

This routing example will create this site map:

============================  ================  ============
url                           method            endpoint
============================  ================  ============
/topics                       GET,POST          topic_list
/topics/<int:topic_id>        GET,PATCH,DELETE  topic_detail
============================  ================  ============<commit_msg>fix routing documentation<commit_after>Routing
=======

Example:

.. code:: python

    from flask import Flask
    from flask_rest_jsonapi import Api

    from your_project.resources import TopicList, TopicDetail

    app = Flask(__name__)
    api = Api(app)

    api.list_route('topic_list', /topics', resource_cls=TopicList)
    api.detail_route('topic_detail', '/topics/<int:topic_id>', resource_cls=TopicDetail)

This routing example will create this site map:

======================  ================  ============
url                     method            endpoint
======================  ================  ============
/topics                 GET,POST          topic_list
/topics/<int:topic_id>  GET,PATCH,DELETE  topic_detail
======================  ================  ============
{'fraction_non_alphanumeric': 0.27057356608478805, 'fraction_numerical': 0.0, 'mean_word_length': 3.5211267605633805, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2527356', 'n_tokens_mistral': 448, 'n_tokens_neox': 406, 'n_words': 90}