Skip to content

fix generated client code cannot convert UUIDs to string when used as…#956

Merged
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
benyaminbeyzaie:handle_uuid
Mar 14, 2023
Merged

fix generated client code cannot convert UUIDs to string when used as…#956
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
benyaminbeyzaie:handle_uuid

Conversation

@benyaminbeyzaie
Copy link
Copy Markdown
Contributor

… path parameters.

fixes #943

@jxsl13
Copy link
Copy Markdown

jxsl13 commented Feb 9, 2023

it might make sense to assert the encoding.TextMarshaller interface after the JSONMarshaller instead of the concrete uuid.UUID type. (json should have a higher priority compared to text).
Edit: Because uuid.UUID implements the TextMarshaller interface, it will work the same but catch even more types that one might want to convert to a string representation.

@johnshiver
Copy link
Copy Markdown

johnshiver commented Feb 10, 2023

really would love this feature, thank you for adding a PR :) this branch should likely update docs and tests?

@deepmap-marcinr deepmap-marcinr merged commit 1e2beac into oapi-codegen:master Mar 14, 2023
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
danicc097 pushed a commit to danicc097/oapi-codegen that referenced this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated client code cannot convert UUIDs to string when used as path parameters.

4 participants