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

Allow for URL to be maintained as a part of backend identifiers in the frontend #1007

Open
2 tasks done
andrewtavis opened this issue Nov 8, 2024 · 2 comments
Open
2 tasks done
Labels
blocked Another issue is blocking feature New feature or request help wanted Extra attention is needed

Comments

@andrewtavis
Copy link
Member

Terms

Description

This issue is related to the work in #1004 to directly return camelCase from the backend. One downside of this is specifically URL, where the conversion of _url will go to Url. All instances of URL were thus changed to Url for simplicity of conversion, but it would be nice to include a custom parser that inherits from djangorestframework-camel-case that would allow for URL to be returned instead.

Along with this we need to discuss if we'd do the same with _id to convert it to ID instead of Id. Other identifiers should also be considered :)

Contribution

Happy to discuss and work on this once #1004 is merged in!

@andrewtavis andrewtavis added feature New feature or request help wanted Extra attention is needed blocked Another issue is blocking labels Nov 8, 2024
@andrewtavis andrewtavis changed the title Allow for URL to be maintained as a part of backend identifiers Allow for URL to be maintained as a part of backend identifiers in the frontend Nov 8, 2024
@andrewtavis
Copy link
Member Author

One consideration for this is whether we should convert the Swagger UI back to snake case and then just do a conversion on the frontend for cases of Url.

@andrewtavis
Copy link
Member Author

Hey @UnknownSean8 👋 In talking about this a bit with @to-sta, we decided a few things:

  1. Let's leave the Swagger UI as camelCase as it should match the results we're getting in the frontend
  2. Let's not worry about id
  3. In the case of URL, if the change is going to happen, then we'll need to figure out a custom parse on the backend level via djangorestframework-camel-case - potentially inheriting from its parser class for those that are _url that we want to be URL

Feel free to look into this, but let's definitely keep the current setup for now and not stress too much about this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Another issue is blocking feature New feature or request help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

1 participant