-
Notifications
You must be signed in to change notification settings - Fork 412
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
Fix some Endpoint::doc
field usages && Rename it to documentation
to avoid this kind of mistake in the future
#3044
Conversation
… to avoid this kind of mistake in the future
@@ -575,7 +575,7 @@ final case class Endpoint[PathInput, Input, Err, Output, Auth <: AuthType]( | |||
output = ((HttpCodec.content[Output2] ++ StatusCodec.status(status)) ?? doc) | self.output, | |||
error, | |||
codecError, | |||
Doc.empty, |
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.
I don't understand why using myEndpoint.out[...](status = ..., doc = ...)
would reset the doc to an empty one. Probably a typo
@@ -593,7 +593,7 @@ final case class Endpoint[PathInput, Input, Err, Output, Auth <: AuthType]( | |||
output = (HttpCodec.content[Output2](mediaType) ++ StatusCodec.Ok ?? doc) | self.output, | |||
error, | |||
codecError, | |||
doc, |
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 was not using the correct doc
. It was using the one passed in parameter and not the one from this
@@ -612,7 +612,7 @@ final case class Endpoint[PathInput, Input, Err, Output, Auth <: AuthType]( | |||
output = ((HttpCodec.content[Output2](mediaType) ++ StatusCodec.status(status)) ?? doc) | self.output, | |||
error, | |||
codecError, | |||
doc, |
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 was not using the correct doc
. It was using the one passed in parameter and not the one from this
@@ -451,7 +451,7 @@ object OpenAPI { | |||
|
|||
// todo maybe not the best regex, but the old one was not working at all | |||
// safe chars from RFC1738 "$" | "-" | "_" | "." | "+" | |||
val validPath: Regex = """\/[\/a-zA-Z0-9\-_{}$.+]*""".r | |||
private val validPath: Regex = """\/[\/a-zA-Z0-9\-_{}$.+]*""".r |
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.
Not related to the main subject of this PR but I've seen that this implementation detail was public. I think we can make it private
No description provided.