Documentation
¶
Overview ¶
pdb-schema-extract parses PeeringDB Django serializer and model Python source to produce an intermediate JSON schema representation. The JSON describes all 13 PeeringDB object types with field metadata, FK references, and read-only annotations.
Usage:
pdb-schema-extract <peeringdb-repo-path> [--validate]
The repo path should point to the root of a local peeringdb/peeringdb checkout. The tool expects to find:
- {repo}/peeringdb_server/serializers.py
- {repo}/../django-peeringdb/src/django_peeringdb/models/abstract.py
- {repo}/../django-peeringdb/src/django_peeringdb/models/concrete.py
- {repo}/../django-peeringdb/src/django_peeringdb/const.py
When --validate is passed, the tool also fetches sample data from beta.peeringdb.com and compares response field names against extracted schema fields, reporting mismatches.
Click to show internal directories.
Click to hide internal directories.