OpenAI icon indicating copy to clipboard operation
OpenAI copied to clipboard

Fix: Rename redundant type names

Open shu223 opened this issue 1 year ago • 1 comments

What

Renamed some redundant type names such as ChatCompletionMessageParam.ChatCompletionSystemMessageParam -> ChatCompletionMessageParam.SystemMessageParam.

Why

In Swift, the names of types within the nested structure usually omit the namespace prefix.

This fix improves the readability:

[Before]

  • ChatCompletionMessageParam.ChatCompletionSystemMessageParam
  • ChatCompletionMessageParam.ChatCompletionUserMessageParam
  • ChatCompletionMessageParam.ChatCompletionAssistantMessageParam
  • ChatCompletionMessageParam.ChatCompletionToolMessageParam

[After]

  • ChatCompletionMessageParam.SystemMessageParam
  • ChatCompletionMessageParam.UserMessageParam
  • ChatCompletionMessageParam.AssistantMessageParam
  • ChatCompletionMessageParam.ToolMessageParam

shu223 avatar May 16 '24 03:05 shu223

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar May 16 '24 03:05 sonarqubecloud[bot]