diff --git a/app/controllers/DocumentationController.scala b/app/controllers/DocumentationController.scala index c9e56c2..7aca459 100644 --- a/app/controllers/DocumentationController.scala +++ b/app/controllers/DocumentationController.scala @@ -32,4 +32,8 @@ class DocumentationController @Inject() (errorHandler: HttpErrorHandler, appCont val versions = APIAccessVersions(appContext.access) Ok(txt.definition(versions.versions.getOrElse(List()))).withHeaders("Content-Type" -> "application/json") } + + def ramlDocs(version: String, filename: String): Action[AnyContent] = { + assets.at(s"/public/api/conf/$version", filename) + } } diff --git a/conf/definition.routes b/conf/definition.routes index d072e7f..3bb7a8d 100644 --- a/conf/definition.routes +++ b/conf/definition.routes @@ -1 +1,2 @@ GET /api/definition @controllers.DocumentationController.definition() +GET /api/conf/:version/*filename @controllers.DocumentationController.ramlDocs(version, filename)