diff --git a/docs/docs/api/schema.md b/docs/docs/api/schema.md index c6f49ecee9..bb4fc6a5a6 100644 --- a/docs/docs/api/schema.md +++ b/docs/docs/api/schema.md @@ -1,26 +1,25 @@ +--- +title: InvenTree API Schema +--- - --- - title: InvenTree API Schema - --- +The InvenTree API is implemented using the [Django REST framework](https://www.django-rest-framework.org). +The API schema as documented below is generated using the [drf-spectactular](https://github.com/tfranzel/drf-spectacular/) extension. - The InvenTree API is implemented using the [Django REST framework](https://www.django-rest-framework.org). - The API schema as documented below is generated using the [drf-spectactular](https://github.com/tfranzel/drf-spectacular/) extension. +## API Version - ## API Version +This documentation is for API version: `166` - This documentation is for API version: `166` +## API Schema File - ## API Schema File +The API schema file is available for download, and can be used for generating client libraries, or for testing API endpoints. - The API schema file is available for download, and can be used for generating client libraries, or for testing API endpoints. +## API Schema Documentation - ## API Schema Documentation +API schema documentation is split into the following categories: - API schema documentation is split into the following categories: - - | Category | Description | - | --- | --- | - | [Authorization and Authentication](./schema/auth.md) | Authorization and Authentication | +| Category | Description | +| --- | --- | +| [Authorization and Authentication](./schema/auth.md) | Authorization and Authentication | | [Background Task Management](./schema/background-task.md) | Background Task Management | | [Barcode Scanning](./schema/barcode.md) | Barcode Scanning | | [Bill of Materials](./schema/bom.md) | Bill of Materials | diff --git a/docs/exctract_schema.py b/docs/exctract_schema.py index 1049d01707..265304ebed 100644 --- a/docs/exctract_schema.py +++ b/docs/exctract_schema.py @@ -2,6 +2,7 @@ import argparse import os +import textwrap import yaml @@ -75,6 +76,8 @@ def generate_index_file(version: str): | --- | --- | """ + output = textwrap.dedent(output).strip() + '\n' + for key, value in SPECIAL_PATHS.items(): output += f'| [{value}](./schema/{key}.md) | {value} |\n'