Skip to content

feat: configure Scalar title from app settings#4

Merged
PANiXiDA merged 2 commits into
mainfrom
feature/scalar-title-from-config
Jun 22, 2026
Merged

feat: configure Scalar title from app settings#4
PANiXiDA merged 2 commits into
mainfrom
feature/scalar-title-from-config

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Что изменено

  • Добавлена внутренняя конфигурация ScalarConfiguration:Title для заголовка HTML-документа Scalar API reference.
  • AddHttp(builder.Configuration) передает конфигурацию в OpenAPI/Scalar setup.
  • IConfiguration в новых точках подключения сделан non-null.
  • Добавлены тесты на биндинг title и отображение title в /scalar.
  • README дополнен примером appsettings.json.

Зачем

Чтобы приложения могли менять текст вкладки браузера Scalar API reference через appsettings.json, без ручного маппинга Scalar в каждом сервисе.

Как проверить локально

dotnet format
dotnet build --configuration Release
dotnet test --configuration Release

Миграции, контракты, конфигурация, breaking changes

  • Миграций нет.
  • HTTP/API контракт не меняется.
  • Добавлена новая необязательная конфигурация: ScalarConfiguration:Title.
  • Версия пакета не обновлялась.

@PANiXiDA PANiXiDA marked this pull request as ready for review June 22, 2026 15:03
@PANiXiDA PANiXiDA merged commit f108d8a into main Jun 22, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +22 to +23
services.Configure<ScalarConfiguration>(
configuration.GetSection(nameof(ScalarConfiguration)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@PANiXiDA PANiXiDA deleted the feature/scalar-title-from-config branch June 22, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants