Skip to content

Commit 0979016

Browse files
committed
chore: fix doc
1 parent fc2459c commit 0979016

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

Makefile.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@ command = "cargo"
4141
args = ["test", "--doc", "-p", "rust-mcp-macros"]
4242

4343

44+
[tasks.doc-strict]
45+
command = "cargo"
46+
args = ["doc", "--no-deps"]
47+
env = { RUSTDOCFLAGS = "-D warnings" }
48+
4449
[tasks.check]
45-
dependencies = ["fmt", "clippy", "test", "doc-test"]
50+
dependencies = ["fmt", "clippy", "test", "doc-strict", "doc-test"]
4651

4752
[tasks.clippy-fix]
4853
command = "cargo"

crates/rust-mcp-extra/src/auth_provider/keycloak.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static SCOPES_SUPPORTED: &[&str] = &[
3939

4040
/// Configuration options for the Keycloak OAuth provider.
4141
pub struct KeycloakAuthOptions<'a> {
42-
/// Base URL of the Keycloak server (e.g. https://keycloak.example.com)
42+
/// Base URL of the Keycloak server (e.g. `https://keycloak.example.com`)
4343
pub keycloak_base_url: String,
4444
/// Public base URL of this MCP server (used for discovery endpoints)
4545
pub mcp_server_url: String,

crates/rust-mcp-sdk/src/auth/spec/audience.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub enum Audience {
1111
}
1212

1313
impl Audience {
14-
/// Converts the audience to a Vec<String> for uniform access.
14+
/// Converts the audience to a `Vec<String>` for uniform access.
1515
pub fn to_vec(&self) -> Vec<String> {
1616
match self {
1717
Audience::Single(s) => vec![s.clone()],

crates/rust-mcp-sdk/src/auth/spec/discovery.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ pub struct AuthorizationServerMetadata {
1919
/// URL to exchange authorization codes for tokens or refresh tokens.
2020
pub token_endpoint: Url,
2121

22-
/// URL of the authorization server's JWK Set [JWK] document
22+
/// URL of the authorization server's JWK Set `JWK` document
2323
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2424
pub jwks_uri: Option<Url>,
2525

2626
/// Endpoint where clients can register dynamically.
2727
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2828
pub registration_endpoint: Option<Url>,
2929

30-
/// List of supported OAuth scopes (e.g., "openid", "profile", "email", mcp:tools) [RECOMMENDED]
30+
/// List of supported OAuth scopes (e.g., "openid", "profile", "email", mcp:tools)
3131
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3232
pub scopes_supported: Option<Vec<String>>,
3333

@@ -58,7 +58,7 @@ pub struct AuthorizationServerMetadata {
5858
pub token_endpoint_auth_signing_alg_values_supported: Option<Vec<String>>,
5959

6060
/// Link to human-readable docs for developers.
61-
/// https://datatracker.ietf.org/doc/html/rfc8414
61+
/// <https://datatracker.ietf.org/doc/html/rfc8414>
6262
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6363
pub service_documentation: Option<Url>,
6464

@@ -171,7 +171,7 @@ impl AuthorizationServerMetadata {
171171
/// represents metadata about a protected resource in the OAuth 2.0 ecosystem.
172172
/// It allows clients and authorization servers to discover how to interact with a protected resource (like an MCP endpoint),
173173
/// including security requirements and supported features.
174-
/// https://datatracker.ietf.org/doc/rfc9728/
174+
/// <https://datatracker.ietf.org/doc/rfc9728>
175175
#[derive(Debug, Serialize, Deserialize, Clone)]
176176
pub struct OauthProtectedResourceMetadata {
177177
/// The base identifier of the protected resource (e.g., an MCP server's URI).
@@ -185,7 +185,7 @@ pub struct OauthProtectedResourceMetadata {
185185

186186
/// URL where the resource exposes its public keys (JWKS) to verify signed tokens.
187187
/// Typically used to verify JWT access tokens.
188-
/// Example: "https://example.com/.well-known/jwks.json"
188+
/// Example: `https://example.com/.well-known/jwks.json`
189189
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
190190
pub jwks_uri: Option<Url>,
191191

@@ -245,7 +245,7 @@ pub struct OauthProtectedResourceMetadata {
245245
}
246246

247247
impl OauthProtectedResourceMetadata {
248-
/// Creates a new [`OAuthProtectedResourceMetadata`] instance with only the
248+
/// Creates a new `OAuthProtectedResourceMetadata` instance with only the
249249
/// minimal required fields populated.
250250
///
251251
/// The `resource` and each entry in `authorization_servers` must be valid URLs.

0 commit comments

Comments
 (0)