Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Inconsistent data type for Campaign IDs (int32/int64) #85

Closed
stnokott opened this issue Apr 24, 2024 · 1 comment · Fixed by #86
Closed

[BUG]: Inconsistent data type for Campaign IDs (int32/int64) #85

stnokott opened this issue Apr 24, 2024 · 1 comment · Fixed by #86
Labels
bug Something isn't working good first issue Good for newcomers mapping This issue or it's solution is related to how information is mapped PR ready This issue is approved and ready to be worked on.

Comments

@stnokott
Copy link
Contributor

stnokott commented Apr 24, 2024

Link to faulty endpoint

https://helldivers-2.github.io/

The name of your client/application

n/a

Request information

n/a

Steps to reproduce

  1. Open official SwaggerUI
  2. Check data type of Campaign.Id (raw type) -> $int32
  3. Check data type of Campaign2.Id (parsed type) -> $int32
  4. Check data type of Event.campaignId -> $int64

What is expected?

Campaign IDs across all endpoints should be of equal type.

What is actually happening?

Campaign ID types from /raw/api/WarSeason/801/Status and /api/v1/campaigns match (both int32), but the type from /api/v1/planet-events (int64) falls out of line.

System Info

n/a

Any additional comments?

I am pretty confident that the game will never reach a point where the campaign IDs will exceed the limits of int32, so it should be safe to use int32 for client applications.

Still, this is an inconsistency in the OpenAPI schema and should be fixed.

@stnokott stnokott added the bug Something isn't working label Apr 24, 2024
@dealloc
Copy link
Member

dealloc commented Apr 24, 2024

good catch!

@dealloc dealloc added good first issue Good for newcomers PR ready This issue is approved and ready to be worked on. mapping This issue or it's solution is related to how information is mapped labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers mapping This issue or it's solution is related to how information is mapped PR ready This issue is approved and ready to be worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants