Skip to content

Commit

Permalink
Rename info_terms to info_terms_url (api and web)
Browse files Browse the repository at this point in the history
Closes #230
  • Loading branch information
bkis committed Jun 10, 2024
1 parent 31e0741 commit cf3c0a7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ TEKST_ES__HOST=es
# TEKST_INFO__SUBTITLE=An online text research platform
# default: An online text research platform

# TEKST_INFO__TERMS=
# TEKST_INFO__TERMS_URL=
# default:

# TEKST_INFO__CONTACT_NAME=Tekst Administrator
Expand Down
2 changes: 1 addition & 1 deletion Tekst-API/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
# TEKST_INFO__SUBTITLE=An online text research platform
# default: An online text research platform

# TEKST_INFO__TERMS=
# TEKST_INFO__TERMS_URL=
# default:

# TEKST_INFO__CONTACT_NAME=Tekst Administrator
Expand Down
6 changes: 3 additions & 3 deletions Tekst-API/tekst/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class InfoConfig(ModelBase):
val.CleanupOneline,
val.EmptyStringToNone,
] = "An online text research platform"
terms: Annotated[
terms_url: Annotated[
CustomHttpUrl | None,
StringConstraints(max_length=512),
val.CleanupOneline,
Expand All @@ -205,13 +205,13 @@ class InfoConfig(ModelBase):
StringConstraints(max_length=64),
val.CleanupOneline,
val.EmptyStringToNone,
] = "Tekst Administrator"
] = None
contact_email: Annotated[
EmailStr | None,
StringConstraints(max_length=64),
val.CleanupOneline,
val.EmptyStringToNone,
] = "[email protected]"
] = None
contact_url: Annotated[
CustomHttpUrl | None,
StringConstraints(max_length=512),
Expand Down
2 changes: 1 addition & 1 deletion Tekst-API/tekst/openapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def generate_schema(app: FastAPI, settings: PlatformSettings):
description=pick_translation(settings.info_subtitle),
routes=app.routes,
servers=[{"url": urljoin(str(_cfg.server_url), str(_cfg.api_path))}],
terms_of_service=_cfg.info.terms,
terms_of_service=_cfg.info.terms_url,
tags=get_tags_metadata(documentation_url=_cfg.info.tekst["documentation"]),
contact={
"name": _cfg.info.contact_name,
Expand Down
4 changes: 4 additions & 0 deletions docs/content/setup/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ The following table lists all the configuration values that can be set as enviro
| `TEKST_DOC__REDOC_URL` | URL sub path (under `TEKST_API_PATH`) to Redoc API docs (String – default: `/redoc`) |
| `TEKST_INFO__PLATFORM_NAME` | Initial platform name; **this can be changed by admins via the system settings UI** (String – default: `Tekst`) |
| `TEKST_INFO__SUBTITLE` | Initial platform subtitle; **this can be changed by admins via the system settings UI** (String – default: `An online text research platform`) |
| `TEKST_INFO__TERMS_URL` | URL to API usage terms (String – default: _none_) |
| `TEKST_INFO__CONTACT_NAME` | API contact name (String – default: _none_) |
| `TEKST_INFO__CONTACT_EMAIL` | API contact email (String – default: _none_) |
| `TEKST_INFO__CONTACT_URL` | API contact URL (String – default: _none_) |
| `TEKST_CORS__ALLOW_ORIGINS` | CORS allow origins; only set this if you don't have a web server / reverse proxy that already handles it! (Comma-separated list as string – default: `*`) |
| `TEKST_CORS__ALLOW_CREDENTIALS` | CORS allow credentials; only set this if you don't have a web server / reverse proxy that already handles it! (Boolean – default: `true`) |
| `TEKST_CORS__ALLOW_METHODS` | CORS allow methods; only set this if you don't have a web server / reverse proxy that already handles it! (Comma-separated list as string – default: `*`) |
Expand Down

0 comments on commit cf3c0a7

Please sign in to comment.