Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ src/schemas/json/cargo.json @ya7010
src/schemas/json/tombi.json @ya7010
src/schemas/json/pyproject.json @ya7010

# Managed by FastAPI Team:
src/schemas/json/partial-fastapi.json @tiangolo

# Managed by Contextive Team:
src/schemas/json/contextive-glossary.json @chrissimon-au
src/test/contextive-glossary/ @chrissimon-au
Expand Down
6 changes: 6 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,12 @@
"fileMatch": [],
"url": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/partial-black.json"
},
{
"name": "partial-fastapi.json",
"description": "FastAPI web framework configuration for pyproject.toml",
"fileMatch": [],
"url": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/partial-fastapi.json"
},
{
"name": "bozr.suite.json",
"description": "Bozr test suite file",
Expand Down
2 changes: 2 additions & 0 deletions src/schema-validation.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
"partial-setuptools-scm.json", // pyproject.json[tool.setuptools-scm]
"partial-scikit-build.json", // pyproject.json[tool.scikit-build]
"partial-cibuildwheel.json", // pyproject.json[tool.cibuildwheel]
"partial-fastapi.json", // pyproject.json[tool.fastapi]
"partial-mypy.json", // pyproject.json[tool.mypy]
"partial-pdm.json", // pyproject.json[tool.pdm]
"partial-pdm-dockerize.json", // pyproject.json[tool.pdm.dockerize]
Expand Down Expand Up @@ -1269,6 +1270,7 @@
"maturin.json",
"partial-black.json",
"partial-cibuildwheel.json",
"partial-fastapi.json",
"partial-mypy.json",
"partial-pdm.json",
"partial-pdm-dockerize.json",
Expand Down
14 changes: 14 additions & 0 deletions src/schemas/json/partial-fastapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/partial-fastapi.json",
"type": "object",
"properties": {
"entrypoint": {
"type": "string",
"title": "Application Entrypoint",
"description": "Import string entrypoint for the **FastAPI** application, in the format: \n```\nimportable.module:attribute\n```\n\nFor example, for an app like:\n\n ```python\nfrom fastapi import FastAPI\n\napp = FastAPI()\n```\n\nin a file at `backend/main.py`\n the config could look like:\n\n```toml\n[tool.fastapi]\nentrypoint = \"backend.main:app\"\n```\n\nDocs: https://fastapi.tiangolo.com/fastapi-cli/",
"examples": ["main:app", "backend.main:app"]
}
},
"additionalProperties": false
}
5 changes: 5 additions & 0 deletions src/schemas/json/pyproject.json
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,11 @@
"title": "Wheel Builder",
"description": "Build Python wheels for all platforms."
},
"fastapi": {
"$ref": "https://json.schemastore.org/partial-fastapi.json",
"title": "Web Framework",
"description": "FastAPI web framework configuration."
},
"mypy": {
"$ref": "https://json.schemastore.org/partial-mypy.json",
"title": "Static Type Checker",
Expand Down
3 changes: 3 additions & 0 deletions src/test/pyproject/fastapi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#:schema ../../schemas/json/pyproject.json
[tool.fastapi]
entrypoint = "backend.main:app"