-
Notifications
You must be signed in to change notification settings - Fork 21
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
GAWB-2339 Add swagger #3
Conversation
src/main/resources/logback.xml
Outdated
</appender> | ||
|
||
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>log/sam.log</file> |
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.
leonardo.log?
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.
feck
src/main/resources/logback.xml
Outdated
<append>true</append> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!-- daily rollover --> | ||
<fileNamePattern>rawls.%d{yyyy-MM-dd}.log</fileNamePattern> |
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.
leonardo
(I see your copy-paste strategy)
val swaggerRoutes: server.Route = { | ||
path("") { | ||
get { | ||
parameter("url") { urlparam => |
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.
It looks like this redirects to the same URI but with the query string stripped out? What is the url
parameter -- is it a Swagger thing that we don't care about?
Since urlparam
is not used I'd recommend doing:
parameter("url") { _ =>
...
}
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 yanked this blindly from sam, so no idea what it's up to
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.
rawls doesn't do this
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.
@dvoet can you clear this up?
redirect(uri.withRawQueryString(""), StatusCodes.MovedPermanently) | ||
} | ||
} ~ | ||
serveIndex() |
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.
Indentation, I think this is correct:
} ~
serveIndex()
// .replace("your-client-id", swaggerConfig.googleClientId) //awaiting integration with dev | ||
// .replace("your-realms", swaggerConfig.realm) | ||
// .replace("your-app-name", swaggerConfig.realm) | ||
.replace("scopeSeparator: \",\"", "scopeSeparator: \" \"") |
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.
Minor, could use """
to avoid escaping quotes, and also interpolated strings.
BTW this is terrifying but I don't really have a better suggestion.
Some minor comments, overall 👍 |
Also reference.conf and logback