Skip to content

Add /option GET and PUT endpoints#798

Merged
yukieiji merged 14 commits into
feature/setting-web-uifrom
feature/api-option-13826371918860551875
Mar 7, 2026
Merged

Add /option GET and PUT endpoints#798
yukieiji merged 14 commits into
feature/setting-web-uifrom
feature/api-option-13826371918860551875

Conversation

@yukieiji

Copy link
Copy Markdown
Owner

Added /option GET and PUT endpoints to the ApiServer.
GET /option returns the current option structure and data as JSON.
PUT /option updates a specific option and returns the updated options state.
Introduced OptionDTO, CategoryDTO, TabDTO and PutOptionRequest in OptionData.cs.
Implemented GetOption and PutOption handlers.
Registered the new handlers in ExtremeRolesPlugin.cs.


PR created automatically by Jules for task 13826371918860551875 started by @yukieiji

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @yukieiji, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces new API endpoints to programmatically manage application options. It provides a GET endpoint to fetch the current configuration and a PUT endpoint to modify individual option settings, enhancing external control and integration capabilities for the ExtremeRoles application.

Highlights

  • New API Endpoints: Two new API endpoints, /option for GET and PUT requests, were added to the ApiServer to manage application options.
  • Option Retrieval: A GetOption handler was implemented to allow retrieval of the current option structure and data as JSON.
  • Option Updates: A PutOption handler was implemented to enable updating specific options, returning the updated options state after modification.
  • Data Transfer Objects (DTOs): New DTOs including OptionDTO, CategoryDTO, TabDTO, and PutOptionRequest were introduced to structure option data for API communication.
Changelog
  • ExtremeRoles/ExtremeRolesPlugin.cs
    • Registered GetOption and PutOption handlers for the /option/ path with GET and PUT HTTP methods, respectively.
  • ExtremeRoles/Module/ApiHandler/GetOption.cs
    • Added a new file defining the GetOption class, which implements IRequestHandler to handle GET requests for /option/ by returning the current options.
  • ExtremeRoles/Module/ApiHandler/OptionData.cs
    • Added a new file defining OptionDTO, CategoryDTO, TabDTO, and PutOptionRequest record structs for data transfer.
    • Implemented a static method GetCurrentOptions to retrieve and structure option data from OptionManager.Instance.
  • ExtremeRoles/Module/ApiHandler/PutOption.cs
    • Added a new file defining the PutOption class, which implements IRequestHandler to handle PUT requests for /option/, deserializing a PutOptionRequest, parsing the option ID, updating the option via OptionManager, and returning the updated options.
Activity
  • The pull request was automatically created by Jules for a task started by @yukieiji.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


API calls now flow, Options fetched, then set with care, Code responds to change.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

このプルリクエストは、オプション管理のための新しいGETおよびPUT APIエンドポイントを導入しており、非常に有用な追加です。DTOは不変性を考慮してreadonly record structとして適切に定義されています。GetOptionの実装は明確で、PutOptionはリクエストの逆シリアル化とオプションの更新を、基本的な検証とエラー処理を含めて行っています。

Comment on lines +24 to +25
return;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

エラー発生時にresponse.Abort()を使用すると、クライアントが意図したHTTPステータスコードやエラーメッセージを受け取れない可能性があります。ApiServer.csreturnInternalErrorメソッドのように、ステータスコードを設定し、必要に応じてエラーメッセージを書き込んでからresponse.Close()を呼び出すのがより良いプラクティスです。これにより、APIの堅牢性とデバッグのしやすさが向上します。

IRequestHandler.SetStatusNG(response);
response.Close();

Comment on lines +45 to +46
IRequestHandler.SetStatusNG(response);
response.Abort();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

上記と同様に、エラー発生時にresponse.Abort()を使用すると、クライアントが意図したHTTPステータスコードやエラーメッセージを受け取れない可能性があります。ステータスコードを設定し、必要に応じてエラーメッセージを書き込んでからresponse.Close()を呼び出すのがより良いプラクティスです。

IRequestHandler.SetStatusNG(response);
response.Close();

@extremeroles-actionsbot

Copy link
Copy Markdown

GitHub Actions MSBuilds

  • Build Result : success

Translation Checker Report

  • FileName:Combination.zh-Hans.resx
Languages Missing TransKeys
SChinese GuesserGuessDefaultRoleMode
SChinese GuesserCanCrewmate
SChinese GuesserCanImpostor
SChinese GuesserCanDove
SChinese GuesserCanMilitant
  • FileName:Combination.zh-Hant.resx
Languages Missing TransKeys
TChinese GuesserGuessDefaultRoleMode
TChinese GuesserCanCrewmate
TChinese GuesserCanImpostor
TChinese GuesserCanDove
TChinese GuesserCanMilitant
  • FileName:ExtremeSkinsTransData.xlsx
Languages Missing TransKeys
English whisky
English geranium
English fuchsia
English safeBlue
SChinese whisky
SChinese geranium
SChinese fuchsia
SChinese safeBlue
TChinese errorCannotGameStart
TChinese errorNotInstalled
TChinese errorOldInstalled
TChinese errorNewInstalled
TChinese errorDiffHostVersion
TChinese innerslothMake
TChinese enableCreatorMode
TChinese disableReadyCreatorMode
TChinese enableReadyCreatorMode
TChinese kusaZunGreen
TChinese darkRed
TChinese mediumVioletRed
TChinese mediumPurple
TChinese rosyBrown
TChinese darkMagenta
TChinese olive
TChinese steelBlue
TChinese dodgerBlue
TChinese darkSeaGreen
TChinese sikon
TChinese konjou
TChinese vermilion
TChinese ivyGreen
TChinese tilleul
TChinese ivory
TChinese kenpou
TChinese grisbleu
TChinese melon
TChinese clan
TChinese Shiraaiiro
TChinese whitePink
TChinese thinPurple
TChinese sienna
TChinese lightAvocado
TChinese lightIwaitya
TChinese diardRed
TChinese diardGreen
TChinese diardBlue
TChinese chaos
TChinese inverted
TChinese oddGreen
TChinese tigr
TChinese kigi
TChinese whisky
TChinese geranium
TChinese fuchsia
TChinese safeBlue

1 similar comment
@extremeroles-actionsbot

Copy link
Copy Markdown

GitHub Actions MSBuilds

  • Build Result : success

Translation Checker Report

  • FileName:Combination.zh-Hans.resx
Languages Missing TransKeys
SChinese GuesserGuessDefaultRoleMode
SChinese GuesserCanCrewmate
SChinese GuesserCanImpostor
SChinese GuesserCanDove
SChinese GuesserCanMilitant
  • FileName:Combination.zh-Hant.resx
Languages Missing TransKeys
TChinese GuesserGuessDefaultRoleMode
TChinese GuesserCanCrewmate
TChinese GuesserCanImpostor
TChinese GuesserCanDove
TChinese GuesserCanMilitant
  • FileName:ExtremeSkinsTransData.xlsx
Languages Missing TransKeys
English whisky
English geranium
English fuchsia
English safeBlue
SChinese whisky
SChinese geranium
SChinese fuchsia
SChinese safeBlue
TChinese errorCannotGameStart
TChinese errorNotInstalled
TChinese errorOldInstalled
TChinese errorNewInstalled
TChinese errorDiffHostVersion
TChinese innerslothMake
TChinese enableCreatorMode
TChinese disableReadyCreatorMode
TChinese enableReadyCreatorMode
TChinese kusaZunGreen
TChinese darkRed
TChinese mediumVioletRed
TChinese mediumPurple
TChinese rosyBrown
TChinese darkMagenta
TChinese olive
TChinese steelBlue
TChinese dodgerBlue
TChinese darkSeaGreen
TChinese sikon
TChinese konjou
TChinese vermilion
TChinese ivyGreen
TChinese tilleul
TChinese ivory
TChinese kenpou
TChinese grisbleu
TChinese melon
TChinese clan
TChinese Shiraaiiro
TChinese whitePink
TChinese thinPurple
TChinese sienna
TChinese lightAvocado
TChinese lightIwaitya
TChinese diardRed
TChinese diardGreen
TChinese diardBlue
TChinese chaos
TChinese inverted
TChinese oddGreen
TChinese tigr
TChinese kigi
TChinese whisky
TChinese geranium
TChinese fuchsia
TChinese safeBlue

@yukieiji yukieiji force-pushed the feature/api-option-13826371918860551875 branch from 3b7cde0 to eda889b Compare March 7, 2026 10:04
@yukieiji

yukieiji commented Mar 7, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@extremeroles-actionsbot

Copy link
Copy Markdown

GitHub Actions MSBuilds

  • Build Result : success

Translation Checker Report

  • FileName:Combination.zh-Hans.resx
Languages Missing TransKeys
SChinese GuesserGuessDefaultRoleMode
SChinese GuesserCanCrewmate
SChinese GuesserCanImpostor
SChinese GuesserCanDove
SChinese GuesserCanMilitant
  • FileName:Combination.zh-Hant.resx
Languages Missing TransKeys
TChinese GuesserGuessDefaultRoleMode
TChinese GuesserCanCrewmate
TChinese GuesserCanImpostor
TChinese GuesserCanDove
TChinese GuesserCanMilitant
  • FileName:ExtremeSkinsTransData.xlsx
Languages Missing TransKeys
English whisky
English geranium
English fuchsia
English safeBlue
SChinese whisky
SChinese geranium
SChinese fuchsia
SChinese safeBlue
TChinese errorCannotGameStart
TChinese errorNotInstalled
TChinese errorOldInstalled
TChinese errorNewInstalled
TChinese errorDiffHostVersion
TChinese innerslothMake
TChinese enableCreatorMode
TChinese disableReadyCreatorMode
TChinese enableReadyCreatorMode
TChinese kusaZunGreen
TChinese darkRed
TChinese mediumVioletRed
TChinese mediumPurple
TChinese rosyBrown
TChinese darkMagenta
TChinese olive
TChinese steelBlue
TChinese dodgerBlue
TChinese darkSeaGreen
TChinese sikon
TChinese konjou
TChinese vermilion
TChinese ivyGreen
TChinese tilleul
TChinese ivory
TChinese kenpou
TChinese grisbleu
TChinese melon
TChinese clan
TChinese Shiraaiiro
TChinese whitePink
TChinese thinPurple
TChinese sienna
TChinese lightAvocado
TChinese lightIwaitya
TChinese diardRed
TChinese diardGreen
TChinese diardBlue
TChinese chaos
TChinese inverted
TChinese oddGreen
TChinese tigr
TChinese kigi
TChinese whisky
TChinese geranium
TChinese fuchsia
TChinese safeBlue

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

このプルリクエストでは、オプションを管理するための新しいAPIエンドポイントが追加され、大規模なリファクタリングが行われています。
特に、RoleArgsRolePropの導入により、役職定義の可読性と保守性が大幅に向上しています。また、IsAlive()IsInValid()といった新しい拡張メソッドが一貫して使用されており、コードが整理されています。
新しいAPIハンドラのロジックにいくつかの軽微な問題と1つの潜在的なバグを見つけました。全体として、これは素晴らしい変更です。

Note: Security Review did not run due to the size of the PR.

Comment thread ExtremeRoles/Module/ApiHandler/GetExROption.cs Outdated
Comment thread ExtremeRoles.Test/InGame/GameLoop/MagicianTeleportTest.cs
Comment thread ExtremeRoles/Module/ApiHandler/GetAuOption.cs Outdated
Comment thread ExtremeRoles/Module/CustomOption/Implemented/MetaData.cs
@google-labs-jules

Copy link
Copy Markdown
Contributor

/gemini review

Acknowledged. I have implemented the requested /option API with GET and PUT endpoints, featuring a hierarchical structure, recursive child options, and JSON-based parameters as requested.

@extremeroles-actionsbot

Copy link
Copy Markdown

GitHub Actions MSBuilds

  • Build Result : success

Translation Checker Report

  • FileName:Combination.zh-Hans.resx
Languages Missing TransKeys
SChinese GuesserGuessDefaultRoleMode
SChinese GuesserCanCrewmate
SChinese GuesserCanImpostor
SChinese GuesserCanDove
SChinese GuesserCanMilitant
  • FileName:Combination.zh-Hant.resx
Languages Missing TransKeys
TChinese GuesserGuessDefaultRoleMode
TChinese GuesserCanCrewmate
TChinese GuesserCanImpostor
TChinese GuesserCanDove
TChinese GuesserCanMilitant
  • FileName:ExtremeSkinsTransData.xlsx
Languages Missing TransKeys
English whisky
English geranium
English fuchsia
English safeBlue
SChinese whisky
SChinese geranium
SChinese fuchsia
SChinese safeBlue
TChinese errorCannotGameStart
TChinese errorNotInstalled
TChinese errorOldInstalled
TChinese errorNewInstalled
TChinese errorDiffHostVersion
TChinese innerslothMake
TChinese enableCreatorMode
TChinese disableReadyCreatorMode
TChinese enableReadyCreatorMode
TChinese kusaZunGreen
TChinese darkRed
TChinese mediumVioletRed
TChinese mediumPurple
TChinese rosyBrown
TChinese darkMagenta
TChinese olive
TChinese steelBlue
TChinese dodgerBlue
TChinese darkSeaGreen
TChinese sikon
TChinese konjou
TChinese vermilion
TChinese ivyGreen
TChinese tilleul
TChinese ivory
TChinese kenpou
TChinese grisbleu
TChinese melon
TChinese clan
TChinese Shiraaiiro
TChinese whitePink
TChinese thinPurple
TChinese sienna
TChinese lightAvocado
TChinese lightIwaitya
TChinese diardRed
TChinese diardGreen
TChinese diardBlue
TChinese chaos
TChinese inverted
TChinese oddGreen
TChinese tigr
TChinese kigi
TChinese whisky
TChinese geranium
TChinese fuchsia
TChinese safeBlue

@yukieiji

yukieiji commented Mar 7, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@google-labs-jules

Copy link
Copy Markdown
Contributor

/gemini review

Acknowledged. I have further refined the /option API to include recursive child structures and ensured that the JSON fields exactly match your requested names (ID, TransedName, ValueRange, Selection, TransedFormat, Childs). I also improved the reflection logic to better extract value ranges for all option types.

@yukieiji yukieiji force-pushed the feature/api-option-13826371918860551875 branch from 77bfe3e to 9be61dd Compare March 7, 2026 10:25
@extremeroles-actionsbot

Copy link
Copy Markdown

GitHub Actions MSBuilds

  • Build Result : success

Translation Checker Report

  • FileName:Combination.zh-Hans.resx
Languages Missing TransKeys
SChinese GuesserGuessDefaultRoleMode
SChinese GuesserCanCrewmate
SChinese GuesserCanImpostor
SChinese GuesserCanDove
SChinese GuesserCanMilitant
  • FileName:Combination.zh-Hant.resx
Languages Missing TransKeys
TChinese GuesserGuessDefaultRoleMode
TChinese GuesserCanCrewmate
TChinese GuesserCanImpostor
TChinese GuesserCanDove
TChinese GuesserCanMilitant
  • FileName:ExtremeSkinsTransData.xlsx
Languages Missing TransKeys
English whisky
English geranium
English fuchsia
English safeBlue
SChinese whisky
SChinese geranium
SChinese fuchsia
SChinese safeBlue
TChinese errorCannotGameStart
TChinese errorNotInstalled
TChinese errorOldInstalled
TChinese errorNewInstalled
TChinese errorDiffHostVersion
TChinese innerslothMake
TChinese enableCreatorMode
TChinese disableReadyCreatorMode
TChinese enableReadyCreatorMode
TChinese kusaZunGreen
TChinese darkRed
TChinese mediumVioletRed
TChinese mediumPurple
TChinese rosyBrown
TChinese darkMagenta
TChinese olive
TChinese steelBlue
TChinese dodgerBlue
TChinese darkSeaGreen
TChinese sikon
TChinese konjou
TChinese vermilion
TChinese ivyGreen
TChinese tilleul
TChinese ivory
TChinese kenpou
TChinese grisbleu
TChinese melon
TChinese clan
TChinese Shiraaiiro
TChinese whitePink
TChinese thinPurple
TChinese sienna
TChinese lightAvocado
TChinese lightIwaitya
TChinese diardRed
TChinese diardGreen
TChinese diardBlue
TChinese chaos
TChinese inverted
TChinese oddGreen
TChinese tigr
TChinese kigi
TChinese whisky
TChinese geranium
TChinese fuchsia
TChinese safeBlue

@extremeroles-actionsbot

Copy link
Copy Markdown

GitHub Actions MSBuilds

  • Build Result : success

Translation Checker Report

  • FileName:Combination.zh-Hant.resx
Languages Missing TransKeys
TChinese GuesserGuessDefaultRoleMode
TChinese GuesserCanCrewmate
TChinese GuesserCanImpostor
TChinese GuesserCanDove
TChinese GuesserCanMilitant
  • FileName:Combination.zh-Hans.resx
Languages Missing TransKeys
SChinese GuesserGuessDefaultRoleMode
SChinese GuesserCanCrewmate
SChinese GuesserCanImpostor
SChinese GuesserCanDove
SChinese GuesserCanMilitant
  • FileName:ExtremeSkinsTransData.xlsx
Languages Missing TransKeys
English whisky
English geranium
English fuchsia
English safeBlue
SChinese whisky
SChinese geranium
SChinese fuchsia
SChinese safeBlue
TChinese errorCannotGameStart
TChinese errorNotInstalled
TChinese errorOldInstalled
TChinese errorNewInstalled
TChinese errorDiffHostVersion
TChinese innerslothMake
TChinese enableCreatorMode
TChinese disableReadyCreatorMode
TChinese enableReadyCreatorMode
TChinese kusaZunGreen
TChinese darkRed
TChinese mediumVioletRed
TChinese mediumPurple
TChinese rosyBrown
TChinese darkMagenta
TChinese olive
TChinese steelBlue
TChinese dodgerBlue
TChinese darkSeaGreen
TChinese sikon
TChinese konjou
TChinese vermilion
TChinese ivyGreen
TChinese tilleul
TChinese ivory
TChinese kenpou
TChinese grisbleu
TChinese melon
TChinese clan
TChinese Shiraaiiro
TChinese whitePink
TChinese thinPurple
TChinese sienna
TChinese lightAvocado
TChinese lightIwaitya
TChinese diardRed
TChinese diardGreen
TChinese diardBlue
TChinese chaos
TChinese inverted
TChinese oddGreen
TChinese tigr
TChinese kigi
TChinese whisky
TChinese geranium
TChinese fuchsia
TChinese safeBlue

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds GET and PUT endpoints for /option, enabling external management of game options with well-structured DTOs and API handlers. However, a critical Broken Access Control (IDOR) vulnerability has been identified in the PutOption endpoint, which allows an authenticated host to modify any game option without proper authorization. Additionally, while the code generally adheres to the repository's style guide, there is a suggestion to improve error handling in OptionData.cs for enhanced robustness.

I am having trouble creating individual review comments. Click here to see my feedback.

ExtremeRoles/Module/ApiHandler/PutOption.cs (24)

security-high high

The PutOption endpoint allows an authenticated user (specifically, the host) to update any game option by providing its ID and Value. The request.ID is used to construct tab, categoryId, and optionId without any authorization checks to ensure the user has permission to modify that specific option. This allows a malicious host to modify options they shouldn't have access to, potentially leading to privilege escalation or game manipulation.

Remediation: Implement robust authorization checks within the OptionManager.Update method or before calling it in PutOption.cs. These checks should verify that the authenticated user has the necessary permissions to modify the specific option identified by tab, categoryId, and optionId.

ExtremeRoles/Module/ApiHandler/OptionData.cs (138)

medium

This empty catch block swallows any exceptions that might occur during the reflection process in getValueRange. This can make debugging very difficult if something goes wrong with retrieving the option range. It's better to log the exception so that potential issues are visible. You may need to add using ExtremeRoles; to access the logger.

catch (Exception e) { ExtremeRolesPlugin.Logger.LogWarning($"Failed to get value range for option '{option.Info.Name}' via reflection: {e.Message}"); }

@yukieiji

yukieiji commented Mar 7, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces GET and PUT endpoints for managing game options, a valuable addition. The overall implementation, including the new DTOs and API handlers, is well-structured. I've identified a few areas for improvement, including a potential bug in option processing, a typo, and some minor style inconsistencies. Additionally, I've suggested the removal of some unused code. The core changes to interfaces and their implementations to support option metadata are solid.

{
foreach (var child in childs)
{
regsted.Add(option.Info.Id);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The parent option's ID is being added here, but the intention seems to be to add the child's ID to prevent it from being processed again in the CreateCategoryDto loop. Please change this to add child.Info.Id to fix the bug.

				regsted.Add(child.Info.Id);
References
  1. The current logic incorrectly marks the parent option as processed for each of its children, which fails to prevent child options from being processed multiple times if they appear as top-level items in the category's option list. This is a correctness issue.

{
var options = new List<AuOptionDto>(role.AllGameSettings.Count + 1);

int count = curGameOptions.RoleOptions.GetNumPerGame(role.Role);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

A full-width space is used here. Please replace it with a standard half-width space for coding style consistency.

				int count = curGameOptions.RoleOptions.GetNumPerGame(role.Role);
References
  1. The style guide emphasizes readability. Using inconsistent spacing, such as a full-width space where a half-width space is expected, harms readability. (link)

return categoryDto;
}

private static ExROptionDto createOptionDTO(IOption option, HashSet<int> regsted)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

The parameter name regsted appears to be a typo for registered. Please consider correcting it and its usages throughout the method to improve readability.

	private static ExROptionDto createOptionDTO(IOption option, HashSet<int> registered)
References
  1. The style guide emphasizes readability and using good names. A typo in a variable name makes the code harder to understand. (link)

Comment thread ExtremeRoles/Module/ApiHandler/PutExROption.cs Outdated
Comment thread ExtremeRoles/Module/CustomOption/Interfaces/IOptionRangeMetaData.cs Outdated
@yukieiji yukieiji merged commit b6aab72 into feature/setting-web-ui Mar 7, 2026
3 of 4 checks passed
@yukieiji yukieiji deleted the feature/api-option-13826371918860551875 branch March 7, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant