Skip to content
Snippets Groups Projects
Commit af3845a4 authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Merge branch 'bugfix/69-add-missing-server-prefix-in-openapi-schema' into 'development'

Resolve "Add missing server prefix in OpenAPI schema"

Closes #69

See merge request cmg/clowm/clowm-s3proxy-service!66
parents d150a9ee 3350a872
No related branches found
No related tags found
No related merge requests found
...@@ -15,13 +15,13 @@ repos: ...@@ -15,13 +15,13 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: check-ast - id: check-ast
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.10.1 rev: 23.11.0
hooks: hooks:
- id: black - id: black
files: app files: app
args: [--check] args: [--check]
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.1.4' rev: 'v0.1.5'
hooks: hooks:
- id: ruff - id: ruff
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
......
...@@ -40,8 +40,10 @@ app = FastAPI( ...@@ -40,8 +40,10 @@ app = FastAPI(
generate_unique_id_function=custom_generate_unique_id, generate_unique_id_function=custom_generate_unique_id,
# license_info={"name": "MIT", "url": "https://mit-license.org/"}, # license_info={"name": "MIT", "url": "https://mit-license.org/"},
root_path=settings.API_PREFIX, root_path=settings.API_PREFIX,
openapi_url=None, # create it manuale to enable caching on client side openapi_url=None, # create it manually to enable caching on client side
) )
if settings.API_PREFIX: # pragma: no cover
app.servers.insert(0, {"url": settings.API_PREFIX})
if settings.OTLP_GRPC_ENDPOINT is not None and len(settings.OTLP_GRPC_ENDPOINT) > 0: # pragma: no cover if settings.OTLP_GRPC_ENDPOINT is not None and len(settings.OTLP_GRPC_ENDPOINT) > 0: # pragma: no cover
resource = Resource(attributes={SERVICE_NAME: "clowm-s3proxy-service"}) resource = Resource(attributes={SERVICE_NAME: "clowm-s3proxy-service"})
......
...@@ -8,7 +8,7 @@ line-length = 120 ...@@ -8,7 +8,7 @@ line-length = 120
[tool.ruff] [tool.ruff]
line-length = 120 line-length = 120
target-version = "py310" target-version = "py311"
[tool.mypy] [tool.mypy]
plugins = ["pydantic.mypy", "sqlalchemy.ext.mypy.plugin"] plugins = ["pydantic.mypy", "sqlalchemy.ext.mypy.plugin"]
......
...@@ -5,7 +5,7 @@ pytest-cov>=4.1.0,<4.2.0 ...@@ -5,7 +5,7 @@ pytest-cov>=4.1.0,<4.2.0
coverage[toml]>=7.3.0,<7.4.0 coverage[toml]>=7.3.0,<7.4.0
# Linters # Linters
ruff>=0.1.0,<0.2.0 ruff>=0.1.0,<0.2.0
black>=23.10.0,<23.11.0 black>=23.11.0,<23.12.0
isort>=5.12.0,<5.13.0 isort>=5.12.0,<5.13.0
mypy>=1.6.0,<1.7.0 mypy>=1.6.0,<1.7.0
# stubs for mypy # stubs for mypy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment