You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://odrc.readthedocs.io/en/latest/installation/config.html -> this is auto-generated via the management command from OAF. is there a way to exclude some settings? e.g. we don't use django.contrib.sites so I don't want SITE_ID to be mentioned. We're also not supporting outgoing email for now
I suppose, though it's not ideal since whenever OAF is updated in a project, I then have to check which settings were added/changed and update my shell scripts/commands accordingly.
Personally I'd much rather have a custom Sphinx directive akin to sphinx.ext.autodoc so that I can write my documentation based on an allow list:
Available configuration parameters
==================================.. entire group with all settings within group:config_group:`Required settings`
:members:.. use a group, but apply allowlist to only document specified members:config_group:`Cross Origin resource sharing`
:members: CORS_ALLOW_ALL_ORIGINS,CORS_ALLOWED_ORIGINS
.. use a group, but exclude some members (e.g. it's available but considered dangerous -> treat as private API):config_group:`Cross Origin resource sharing`
:exclude: CORS_ALLOW_ALL_ORIGINS
.. document individual parameters, allowlist basis
Special snowflake parameters
----------------------------.. use documentation from `config` helper:config_param:`DISABLE_2FA`
.. override baked in documentation:config_param:`DISABLE_2FA`: Custom documentation snippet to override whatever is specified in `config`.
.. ability to override the default, in case it was overridden (e.g. via `os.environ.setdefault("...", ...)`):default: 1
This closely matches my thoughts about django-setup-configuration setup/docs too, so tagging @pi-sigma for completeness sake.
Question from @sergei-maertens via slack:
We could add something like
--exclude-var
to the management command (https://github.com/maykinmedia/open-api-framework/blob/main/open_api_framework/management/commands/generate_envvar_docs.py#L32-L36) to exclude individual variables/settings@sergei-maertens would this work for you?
The text was updated successfully, but these errors were encountered: