swap username and password in LoginRequest#62
Conversation
|
@mxyns thanks |
|
hi @FloSch62, I have found that the fields generated by swaggo/swag are ordered by alphabetical order, explaining why username is after password in the generated swagger. There is a way to force the ordering by adding Would it be okay to have the .yml and .json with different field ordering until this is fixed? |
|
I am not sure, if swaggo will "fix" this... see: Since the x-order extension only affects .json and not .yaml, I'd rather keep them consistent and not introduce a difference between the two formats. OpenAPI properties are inherently unordered (they're JSON objects/maps), so code generators that rely on property ordering are technically not spec-compliant. I think we can accept the alphabetical ordering as a swaggo limitation for now. If swaggo fixes the YAML side in the future, we can revisit adding x-order tags at that point. |
addresses Issue #61
basically swaps user and pass so autogenerated code has constructors with the username as the first parameter