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

REST: Implement viaBody, viaQuery, viaHeader as parameters UDAs #2516

Merged
merged 2 commits into from Jan 13, 2021

Conversation

Geod24
Copy link
Contributor

@Geod24 Geod24 commented Jan 8, 2021

Something I've been wanting for a while, should make user code much more friendly.
The names have changed to avoid weird overrides with the headerParam & co functions, but also to make function prototypes shorter.

@s-ludwig
Copy link
Member

Looks good and definitely the way to go, I forgot about this when UDAs were made available for parameters.

The only thing I have would be to name this "viaX" instead of "byX", as it captures the bi-directional nature of the annotation and doesn't interfere with range constructors that are named like that.

Since our minimum supported version is v2.084.0 (and should be v2.085.0),
and parameters UDAs are available since v2.082.0, it is high time to simplify
user code by moving from the error prone UDAs on functions to UDAs on parameters.
@Geod24
Copy link
Contributor Author

Geod24 commented Jan 13, 2021

Ah, I actually hesitated between via and by, but opted for the shorter name. Switched to via.

@Geod24 Geod24 changed the title REST: Implement byBody, byQuery, byHeader as parameters UDAs REST: Implement viaBody, viaQuery, viaHeader as parameters UDAs Jan 13, 2021
@s-ludwig s-ludwig merged commit aaff28b into vibe-d:master Jan 13, 2021
@Geod24 Geod24 deleted the wpat-on-parameters branch January 14, 2021 00:35
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.

None yet

2 participants