-
Notifications
You must be signed in to change notification settings - Fork 0
#11 Add support for enums without renaming #24
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
Conversation
JaCoCo code coverage report - springdoc-openapi-scala
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read through code, looks good to me
@@ -66,6 +67,7 @@ class OpenAPIModelRegistration(components: Components) { | |||
case t if t <:< typeOf[Option[_]] => handleType(t.typeArgs.head) | |||
case t if t <:< typeOf[Seq[_]] || t <:< typeOf[Array[_]] => handleSeqLike(t) | |||
case t if t <:< typeOf[Set[_]] => handleSet(t) | |||
case t if t <:< typeOf[Enumeration#Value] => handleEnum(tpe) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you pass tpe
here and not t
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually can be t
. Changed, thanks.
Initially when I was experimenting, I passed tpe
as it is not dealiased, and I thought it might be needed non-dealiased. But parentObjectType
is fortunately the same whether dealiased or not, so can be t
.
assertEnumIsStringAndHasFollowingOptions(actualSchemas, "SimpleEnums.b", Set("Cleaner", "Floor")) | ||
} | ||
|
||
it should "make complex Enumeration (with renaming) an OpenAPI enum" ignore { // TODO: #23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What todo is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is ignored as it currently doesn't pass (this PR adds support only for simple Enumerations). Changed the comment to be more descriptive
Closes #11