Skip to content

Conversation

@zinzoddari
Copy link
Contributor

HI πŸ™‹πŸ»β€β™€οΈ

The code was previously hardcoding the length of the string [ #/components/schemas/ ] (21) directly in the code. It has now been modified to use the length of the constant value declared in the [ Components ] class of [ io.swagger.v3.oas.models ].

Thank you πŸ™‡πŸ»β€β™€οΈ

@zinzoddari
Copy link
Contributor Author

The reason for this change was that when I first looked at the code, it took me a while to understand why the number 21 was used. By relying on the constant value, any future changes to the value can be handled without manually finding and updating the code. Additionally, it makes it easier to understand which length of value is being referenced. πŸ’ͺπŸ»πŸ˜ƒ

@bnasslahsen bnasslahsen merged commit 089287d into springdoc:main Sep 17, 2024
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