Frequently asked questions

Can't find your answer? Email routeman@swastik.ai or call +91 76545 31678.

How do I generate a Postman collection from a Django, Flask or FastAPI project?

Install routeman in the virtualenv your project runs in and run one command from the project folder: pip install routeman then routeman generate. It writes postman/<name>.postman_collection.json and a local environment file. Import both in Postman with File → Import.

Do I need OpenAPI, Swagger, drf-spectacular or drf-yasg?

No. routeman reads your application's real routes and its serializers, forms and models directly. You don't need an OpenAPI schema or any documentation library. For FastAPI it uses the OpenAPI document that FastAPI already builds in memory, and it also picks up routes hidden with include_in_schema=False.

Is routeman free?

Yes. routeman is open source under the MIT licence and free for personal and commercial use. It is published on PyPI as routeman.

Does routeman send requests to my API or touch my database?

No. routeman imports your app to read its URL configuration, the same way manage.py or your WSGI/ASGI server does. It never runs queries, migrations or HTTP requests. The output is two JSON files on disk.

Which frameworks and versions are supported?

Django 3.2 to 6, Django REST framework 3.12+, Flask 2.0 to 3.x (including blueprints, MethodView, Flask-RESTful and flask-smorest) and FastAPI 0.95+ with Pydantic v1 or v2. routeman itself needs Python 3.9 or newer.

How does routeman handle authentication like JWT or DRF tokens?

It detects the scheme from your code: Bearer/JWT (SimpleJWT, flask-jwt-extended, OAuth2 in FastAPI), DRF Token and Knox, Basic, API key headers and session auth. It sets collection-level auth, marks public endpoints as No Auth and adds a test script to the login request that saves access_token and refresh_token into the environment automatically.

Which Postman collection format does routeman produce?

Postman Collection Format v2.1 (collection.json schema), the format Postman, Newman, Insomnia and most API clients import. Environment files use Postman's environment format with secrets such as access_token and password marked as secret.

Can I regenerate the collection when my API changes without duplicating it in Postman?

Yes. Collection and request ids are stable (derived from the project and route), so importing a regenerated file replaces the previous version instead of creating a copy. Many teams run routeman generate in CI and commit the postman/ folder.

Can I use the generated collection with Newman in CI?

Yes. Every request includes a test that fails when the server answers with a 5xx status, so newman run postman/<name>.postman_collection.json -e postman/<name>.local.postman_environment.json works as an instant smoke test of the whole API.

What if my view has no serializer, form or schema?

routeman reads the view's source code and looks for the fields it uses, for example request.data.get('email'), data['name'], request.POST, request.args.get('page', type=int) or json.loads(request.body). Requests built this way are marked as inferred so you know to double-check them.

My settings need environment variables. Will routeman still load the project?

Yes. routeman loads .env from the project folder automatically before importing your app. Use --env-file path/to/file for a different file.

How do I add staging and production environments?

Pass -e once per server, for example routeman generate -e staging=https://staging.example.com -e production=https://api.example.com, or list them under [routeman.environments] in routeman.toml. routeman writes one Postman environment file per server.

Can I leave internal or admin endpoints out?

The Django admin and static file routes are left out automatically. Exclude anything else with a regular expression: routeman generate -x '^/internal/' -x '^/health', or exclude = ["^/internal/"] in routeman.toml.

Does it work with Django Channels or FastAPI WebSockets?

WebSocket routes from Django Channels and FastAPI are found and listed in the collection description, so they are documented alongside your HTTP endpoints.

Is routeman an official Postman product?

No. routeman is an independent open-source project by Swastik Tech Solutions Pvt Ltd, built by Divakar. Postman is a trademark of Postman, Inc.

How can I report a bug or request a feature?

Email routeman@swastik.ai with your framework and version, the command you ran and its output (routeman routes output helps a lot), or use the contact page.