Skip to content

Conversation

@alexandear
Copy link
Contributor

This adds generic openapi3.Ptr function to be used instead of openapi3.BoolPtr, openapi3.Float64Ptr, openapi3.Int64Ptr, openapi3.Uint64Ptr.

@alexandear alexandear force-pushed the openapi3/ptr branch 2 times, most recently from 59997e4 to cbe9616 Compare November 26, 2024 16:54
@fenollp
Copy link
Collaborator

fenollp commented Nov 26, 2024

I fail to see the improvement here. Today's explicitly typed functions make it much easier to grasp their purpose and to find IMO. Thoughts?

@alexandear
Copy link
Contributor Author

I fail to see the improvement here. Today's explicitly typed functions make it much easier to grasp their purpose and to find IMO. Thoughts?

I intend to introduce' Ptr' to shorten BoolPtr, Float64Ptr, Int64Ptr, Uint64Ptr. Fewer symbols - same meaning. And this reduces the number of functions to remember for the library users.

See these PRs where Ptr was recently introduced:

@grokify
Copy link

grokify commented Jan 15, 2025

My preference is to use the generic openapi3.Ptr. From my perspective, it's a cleaner interface and there is not much information gain from having separate functions.

@alexandear
Copy link
Contributor Author

@fenollp, is there a chance to revisit this, or should we close the PR?

@fenollp fenollp merged commit 2de45f7 into getkin:master Jun 16, 2025
5 checks passed
@alexandear alexandear deleted the openapi3/ptr branch June 16, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants