Skip to content

added support for Optional Request Parameters #550

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

Merged

Conversation

LukasDetermann
Copy link
Contributor

I wanted to contribute and asked @SentryMan for a good starter feature. I tried to emulate the style.

Copy link
Collaborator

@SentryMan SentryMan left a comment

Choose a reason for hiding this comment

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

LGTM

@SentryMan SentryMan added the enhancement New feature or request label Jan 18, 2025
@SentryMan SentryMan added this to the 3.0 milestone Jan 18, 2025
@SentryMan SentryMan merged commit eccb601 into avaje:master Jan 18, 2025
6 checks passed
rbygrave added a commit that referenced this pull request Jan 26, 2025
- Adds tests that were missing in HelloControllerTest that actually exercises the feature
- Fixes the controller URLs removing incorrect {myOptional} from urls
- Fixes PathTypeConversion to handle null values
- Adds missing javadoc on new public methods of PathTypeConversion
- Adds some useful unit tests for TypeMap.OptionalHandler
@rbygrave
Copy link
Contributor

Thanks for the PR, nice work. Note that I have submitted a PR to fix the issues/bugs that are in this PR/change.

The main thing to note is that in the past I've allowed some PRs to be merged when they didn't originally actually have tests to assert the behaviour and so I've inadvertently allowed the standards to drop in that regard. Instead I've added those tests to the PR's myself or done a followup PR that adds the tests - we should not do this going forward.

That is, any new feature or bug fix or change should include tests that actually exercise that feature. It is not sufficient for something to compile, we actually need tests to assert against the expected behaviour. In this case those tests were missing from this PR. In adding those tests we would have hit the issues with this change (around handling null, and that the tests had invalid URLs.

Cheers, Rob.

rbygrave added a commit that referenced this pull request Jan 26, 2025
- Adds tests that were missing in HelloControllerTest that actually exercises the feature
- Fixes the controller URLs removing incorrect {myOptional} from urls
- Fixes PathTypeConversion to handle null values
- Adds missing javadoc on new public methods of PathTypeConversion
- Adds some useful unit tests for TypeMap.OptionalHandler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants