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

Why are we still referencing v0 ? #927

Closed
teolemon opened this issue May 14, 2024 · 3 comments · Fixed by #936
Closed

Why are we still referencing v0 ? #927

teolemon opened this issue May 14, 2024 · 3 comments · Fixed by #936
Assignees

Comments

@teolemon
Copy link
Member

teolemon commented May 14, 2024

Description

xxxx - - [14/May/2024:16:11:37 +0000] "GET /cgi/display.pl?api/v0/product/8710496979101.json HTTP/1.0" 200 21111 "-" "Dart/3.2 (dart:io)" 0/15392
xxxx - - [14/May/2024:16:11:38 +0000] "GET /cgi/display.pl?api/v0/product/8710496979101.json HTTP/1.0" 200 21113 "-" "Dart/3.2 (dart:io)" 0/11536
xxxxx - - [14/May/2024:16:11:38 +0000] "GET /cgi/display.pl?api/v0/product/8710496979101.json HTTP/1.0" 200 21113 "-" "Dart/3.2 (dart:io)" 0/13177
xxxxx - - [14/May/2024:16:1
@monsieurtanuki
Copy link
Contributor

Why are we still referencing v0 ?

Because v0 has a specific URL builder.

  String getPath(final String barcode) {
    if (version == 0) {
      return '/api/v0/product/$barcode.json';
    }
    return '/api/v$version/product/$barcode/';
  }

We're getting blasted by those queries, they could at least be v1 or v2 :-)

We can change that by removing 0 as a possible value (minor breaking change), or silently upgrading it to 2.
Do you have a preference?

@teolemon
Copy link
Member Author

@stephanegigandet

@stephanegigandet
Copy link
Contributor

We can upgrade to v2 if all the tests still pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants