feat: configure Scalar title from app settings#4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af7774b726
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| services.Configure<ScalarConfiguration>( | ||
| configuration.GetSection(nameof(ScalarConfiguration))); |
There was a problem hiding this comment.
Preserve null configuration support
When callers use the previously documented AddHttp(configuration: null) path to keep package defaults, AddHttp now forwards that null into OpenAPI setup and this dereference throws during service registration before the app can start. ForwardedHeadersConfiguration still explicitly supports a null configuration, so the new Scalar binding should skip binding or use an empty/default configuration instead of making the public AddHttp path effectively non-null.
Useful? React with 👍 / 👎.
Что изменено
ScalarConfiguration:Titleдля заголовка HTML-документа Scalar API reference.AddHttp(builder.Configuration)передает конфигурацию в OpenAPI/Scalar setup.IConfigurationв новых точках подключения сделан non-null./scalar.appsettings.json.Зачем
Чтобы приложения могли менять текст вкладки браузера Scalar API reference через
appsettings.json, без ручного маппинга Scalar в каждом сервисе.Как проверить локально
Миграции, контракты, конфигурация, breaking changes
ScalarConfiguration:Title.