Skip to content
Open
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
2 changes: 2 additions & 0 deletions .env.template.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://hyperion.myecl.fr/settings-json-schema.json

###############################################
# Authorization using OAuth or Openid connect #
###############################################
Expand Down
2 changes: 2 additions & 0 deletions .env.test.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://hyperion.myecl.fr/settings-json-schema.json

###########################################################################
# This dotenv file and its values should NEVER be used in PRODUCTION! #
###########################################################################
Expand Down
17 changes: 17 additions & 0 deletions app/core/core_endpoints/endpoints_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,20 @@ async def delete_module_account_type_visibility(
allowed_account_type=account_type,
db=db,
)


@router.get(
"/settings-json-schema.json",
status_code=200,
)
async def get_settings_json_schema():
"""
Return Settings JSON schema.

It can be used in vscode:
```yml
# yaml-language-server: $schema=https://hyperion.myecl.fr/settings-json-schema.json
```
"""

return Settings.model_json_schema()