Skip to content

feat: allow route_reverse params of type uuid to be passed as str#3972

Merged
provinzkraut merged 1 commit intolitestar-org:mainfrom
aedify-swi:main
Jan 25, 2025
Merged

feat: allow route_reverse params of type uuid to be passed as str#3972
provinzkraut merged 1 commit intolitestar-org:mainfrom
aedify-swi:main

Conversation

@aedify-swi
Copy link
Copy Markdown
Contributor

Description

This allows params of type UUID to be passed as strings (e.g. their hex representation) into route_reverse (just like datetime, Path etc.). I don't know if the test is really necessary, but that is for the maintainers to decide.

Originally I intended to allow int too, but this broke about 20 tests I did not feel confident to fix them all in a reasonable amount of time.

Discussed in #3968

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.34%. Comparing base (1764dd7) to head (5a0584b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3972   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files         347      347           
  Lines       15755    15756    +1     
  Branches     1741     1741           
=======================================
+ Hits        15495    15496    +1     
  Misses        124      124           
  Partials      136      136           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3972

Copy link
Copy Markdown
Member

@provinzkraut provinzkraut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aedify-swi!

@provinzkraut provinzkraut merged commit e5340cf into litestar-org:main Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants