Commit Graph

8 Commits

Author SHA1 Message Date
Max Sokolski
2b478146f8 docs: add DEPR ticket for some mfe_config settings (#37370) 2025-09-23 14:48:53 -04:00
Serhiii Nanai
55a3757107 feat: Extend MFE Config API for frontend-app-catalog [FC-0086] (#37130)
* feat: return response merged from base config, mfe config and mfe overrides

* test: adjust existing tests

* test: add new test methods

* fix: add blank line

* fix: remove homepage_overlay_html

* fix: typo in a comment

* test: change dict merge order to follow the correct hierarchy

* fix: change response keys to uppercase

* fix: add enable_course_discovery

* fix: change COURSES_ARE_BROWSABLE to NON_BROWSABLE_COURSES

* fix: remove show_homepage_promo_video

* fix: use None as default for promo video youtube id

* docs: expand docstrings, rename method/variables

* fix: remove is_cosmetic_price_enabled field
2025-08-15 09:15:40 -04:00
Kyle McCormick
c253ec4181 feat!: change /api/v1/mfe_config to /api/mfe_config/v1
* This changes the API's path. The reasoning is that this is Version 1 of
  the mfe_config API, not Version 1 of the LMS's entire API, so the v1
  should come after mfe_config.
* Why does this matter? Firstly, consistency. Secondly, it affects our
  generated API documentation. If you visited
  https://courses.edx.org/api-docs, you could see that the API was
  listed under "v1" instead of "mfe_config".
2022-08-16 11:38:53 -04:00
Kyle McCormick
1b52ad58a5 docs: add more detail to MFE Config API documentation
No functional changes here. This just uses the edx_api_doc_tools package
to add some additional documentation to the new API. The documentation
can be read from the code, or viewed by visiting
http://<LMS_ROOT>/api-docs and searching for "mfe_config".
2022-08-16 11:38:53 -04:00
Kyle McCormick
8edefe74ff feat!: change names of dynamic MFE config Django settings
Formerly, the settings were:

* `MFE_CONFIG` for common config.
* `MFE_CONFIG_<APP_ID>` for app-specific overrides,
  with each app getting its own Django setting.

This commit changes it to:

* `MFE_CONFIG` for common config (unchanged)
* `MFE_CONFIG_OVERRIDES` for app-specific overrides,
  where each app gets a top-level key in the dictionary.

Why the change?

* We want common.py to have a complete list of overridable settings, as
  it helps operators reason about configuration and allows us to generate
  config documentation using toggle annotations. Dynamically generating
  setting names based on arbitrary APP_IDs makes this impossible.
* getattr(...) generally makes code more complicated bug prone. Tools
  like pylint and mypy cannot effectively analyze any code that uses
  dynamic attribute access.
2022-08-16 11:38:53 -04:00
Maria Fernanda Magallanes Zubillaga
f2488b10a6 feat: make it compatible with django settings 2022-07-08 01:56:15 -04:00
Maria Fernanda Magallanes Zubillaga
d6a30882d1 docs: add the ADR 2022-07-08 00:05:10 -04:00
Maria Fernanda Magallanes Zubillaga
f6f66d0f39 refactor!: change the api naming and url 2022-07-08 00:05:10 -04:00