You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-07 17:03:01 +03:00
Host a Swagger UI both in the static documentation and by the server
This commit is contained in:
@@ -870,3 +870,24 @@ pub struct GraphQLPlayground;
|
||||
impl SimpleRoute for GraphQLPlayground {
|
||||
const PATH: &'static str = "/graphql/playground";
|
||||
}
|
||||
|
||||
/// `GET /api/spec.json`
|
||||
pub struct ApiSpec;
|
||||
|
||||
impl SimpleRoute for ApiSpec {
|
||||
const PATH: &'static str = "/api/spec.json";
|
||||
}
|
||||
|
||||
/// `GET /api/doc/`
|
||||
pub struct ApiDoc;
|
||||
|
||||
impl SimpleRoute for ApiDoc {
|
||||
const PATH: &'static str = "/api/doc/";
|
||||
}
|
||||
|
||||
/// `GET /api/doc/oauth2-callback`
|
||||
pub struct ApiDocCallback;
|
||||
|
||||
impl SimpleRoute for ApiDocCallback {
|
||||
const PATH: &'static str = "/api/doc/oauth2-callback";
|
||||
}
|
||||
|
@@ -28,7 +28,9 @@ pub struct UrlBuilder {
|
||||
}
|
||||
|
||||
impl UrlBuilder {
|
||||
fn absolute_url_for<U>(&self, destination: &U) -> Url
|
||||
/// Create an absolute URL for a route
|
||||
#[must_use]
|
||||
pub fn absolute_url_for<U>(&self, destination: &U) -> Url
|
||||
where
|
||||
U: Route,
|
||||
{
|
||||
|
Reference in New Issue
Block a user