Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SASC
sentinel-legacy
Commits
0664f861
Commit
0664f861
authored
Jul 02, 2015
by
bow
Browse files
Rename /api-spec -> /api-specs and set URL detection in docs page correctly
parent
a00812ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/it/scala/nl/lumc/sasc/sentinel/api/RootControllerSpec.scala
View file @
0664f861
...
...
@@ -27,7 +27,7 @@ class RootControllerSpec extends SentinelServletSpec with Mockito {
implicit
val
swagger
=
new
SentinelSwagger
addServlet
(
new
RootController
,
s
"/*"
)
addServlet
(
new
ApiDocsController
,
"/api-docs/*"
)
addServlet
(
new
ApiSpecsController
,
"/api-spec/*"
)
addServlet
(
new
ApiSpecsController
,
"/api-spec
s
/*"
)
"OPTIONS '/'"
>>
{
br
...
...
@@ -59,9 +59,9 @@ class RootControllerSpec extends SentinelServletSpec with Mockito {
}
}
"GET '/api-spec' should"
>>
inline
{
"GET '/api-spec
s
' should"
>>
inline
{
val
endpoint
=
"/api-spec"
val
endpoint
=
"/api-spec
s
"
new
Context
.
PriorRequests
{
...
...
src/main/scala/ScalatraBootstrap.scala
View file @
0664f861
...
...
@@ -80,7 +80,7 @@ class ScalatraBootstrap extends LifeCycle {
context
mount
(
new
AnnotationsController
,
"/annotations/*"
)
context
mount
(
new
RunsController
,
"/runs/*"
)
context
mount
(
new
UsersController
,
"/users/*"
)
context
mount
(
new
ApiSpecsController
,
"/api-spec/*"
)
context
mount
(
new
ApiSpecsController
,
"/api-spec
s
/*"
)
context
mount
(
new
ApiDocsController
,
"/api-docs/*"
)
context
setInitParameter
(
org
.
scalatra
.
EnvironmentKey
,
env
)
}
catch
{
...
...
src/main/webapp/api-docs/index.html
View file @
0664f861
...
...
@@ -27,7 +27,7 @@
if
(
url
&&
url
.
length
>
1
)
{
url
=
decodeURIComponent
(
url
[
1
]);
}
else
{
url
=
window
.
location
.
href
.
replace
(
"
api-docs
"
,
"
api-spec
"
)
;
url
=
window
.
location
.
origin
+
"
/
api-spec
s
"
;
}
window
.
swaggerUi
=
new
SwaggerUi
({
url
:
url
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment