-
Notifications
You must be signed in to change notification settings - Fork 133
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
Clarify 'required: false' and 'default: ...' both being present #1534
Merged
blast-hardcheese
merged 11 commits into
guardrail-dev:master
from
blast-hardcheese:resolve-1532
Jul 10, 2022
Merged
Clarify 'required: false' and 'default: ...' both being present #1534
blast-hardcheese
merged 11 commits into
guardrail-dev:master
from
blast-hardcheese:resolve-1532
Jul 10, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blast-hardcheese
added
bug
Unexpected behaviour for functionality that either was intended to work, or has worked in the past
scala
Broadly concerning Scala code generation or the generated Scala code
core
Pertains to guardrail-core
minor
Bump minor version
labels
Jul 9, 2022
Codecov Report
@@ Coverage Diff @@
## master #1534 +/- ##
=======================================
Coverage 84.80% 84.81%
=======================================
Files 95 95
Lines 5707 5702 -5
Branches 141 152 +11
=======================================
- Hits 4840 4836 -4
+ Misses 867 866 -1
Continue to review full report at Codecov.
|
…en default values are present
blast-hardcheese
removed
bug
Unexpected behaviour for functionality that either was intended to work, or has worked in the past
scala
Broadly concerning Scala code generation or the generated Scala code
core
Pertains to guardrail-core
minor
Bump minor version
labels
Jul 10, 2022
github-actions
bot
added
core
Pertains to guardrail-core
java-support
Pertains to guardrail-java-support
scala-akka-http
Pertains to guardrail-scala-akka-http
scala-http4s
Pertains to guardrail-scala-http4s
scala-support
Pertains to guardrail-scala-support
labels
Jul 10, 2022
blast-hardcheese
added
bug
Unexpected behaviour for functionality that either was intended to work, or has worked in the past
scala
Broadly concerning Scala code generation or the generated Scala code
minor
Bump minor version
and removed
scala-akka-http
Pertains to guardrail-scala-akka-http
scala-http4s
Pertains to guardrail-scala-http4s
labels
Jul 10, 2022
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Unexpected behaviour for functionality that either was intended to work, or has worked in the past
core
Pertains to guardrail-core
java-support
Pertains to guardrail-java-support
minor
Bump minor version
scala
Broadly concerning Scala code generation or the generated Scala code
scala-support
Pertains to guardrail-scala-support
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@lolgab correctly pointed out this part of the OpenAPI docs:
This PR alters the handling for parameters and properties in the case where
getRequired
does not returntrue
, and that there is adefault
present.Previously, we would
liftOptionalTerm
andliftOptionalType
based purely ongetRequired() == true
, but now if there is a default value present we leave the values as non-Option
-al types and terms.Practically, that means that if we have a
we used to get a function like:
but now we will get
This is because the spec mandates that clients always send values in this case, it is invalid to override the default
Some(300L)
with aNone
.