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

Deprecated Annotation Not Reflected in Generated Client Code #2214

Open
Isakdl opened this issue May 7, 2024 Discussed in #2212 · 0 comments
Open

Deprecated Annotation Not Reflected in Generated Client Code #2214

Isakdl opened this issue May 7, 2024 Discussed in #2212 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@Isakdl
Copy link
Collaborator

Isakdl commented May 7, 2024

Discussed in #2212

Originally posted by adiltirur May 6, 2024
Hello everyone,

I've been working with Serverpod and I've come across an issue where the @deprecated annotation in the server code is not being reflected in the generated client code.

Here's a snippet of the server code for context:

@Deprecated('Use getDistanceMatrixList instead')
Future<ApiDistanceMatrixResult?> getDistanceMatrix(
  Session session,
  String originLatitude,
  String originLongitude,
  String destination,
) async {
  final endPoint =
      _createDistanceMatrixUrl(originLatitude, originLongitude, destination);
  final response = await http.get(Uri.parse(endPoint));
  return _handleDistanceMatrixResponse(response);
}

In this snippet, the getDistanceMatrix method is marked as deprecated and the suggestion is to use getDistanceMatrixList instead. However, this deprecation warning is not showing up in the generated client code.

Has anyone else experienced this issue? Any suggestions on how to ensure that the @deprecated annotation is carried over to the generated client code would be greatly appreciated.

Thank you in advance for your help.

@Isakdl Isakdl added bug Something isn't working enhancement New feature or request labels May 7, 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 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant