From c77681dfb8dff7b6321ce1d0fc5fea73e5f952bb Mon Sep 17 00:00:00 2001 From: Rene Leveille Date: Tue, 30 Jul 2024 13:55:04 -0400 Subject: [PATCH 1/2] Add github action to catch badly formated docs --- .github/workflows/ci.yml | 19 +++++++++++++++++-- passkey-types/src/ctap2/get_assertion.rs | 5 ++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 476040f..dc2bf08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,22 @@ jobs: profile: minimal toolchain: ${{ matrix.rust }} components: rustfmt - - run: rustup run ${{ matrix.rust}} cargo fmt --all -- --check + - run: rustup run ${{ matrix.rust }} cargo fmt --all -- --check + + docs: + name: Documentation + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + - run: RUSTDOCFLAGS="-D warnings " rustup run ${{ matrix.rust }} cargo doc --workspace --no-deps --all-features test: name: Test @@ -56,7 +71,7 @@ jobs: with: profile: minimal toolchain: ${{ matrix.rust }} - - run: rustup run ${{ matrix.rust }} cargo test + - run: rustup run ${{ matrix.rust }} cargo test typeshare: name: Typeshare diff --git a/passkey-types/src/ctap2/get_assertion.rs b/passkey-types/src/ctap2/get_assertion.rs index 2159767..40eb462 100644 --- a/passkey-types/src/ctap2/get_assertion.rs +++ b/passkey-types/src/ctap2/get_assertion.rs @@ -10,7 +10,10 @@ use crate::{ pub use crate::ctap2::make_credential::Options; #[cfg(doc)] -use crate::webauthn::{CollectedClientData, PublicKeyCredentialRequestOptions}; +use { + crate::webauthn::{CollectedClientData, PublicKeyCredentialRequestOptions}, + ciborium::Value, +}; use super::extensions::{AuthenticatorPrfGetOutputs, AuthenticatorPrfInputs, HmacGetSecretInput}; From 0c39e62c9d22f57163e68eac864b58d8eed31e32 Mon Sep 17 00:00:00 2001 From: Rene Leveille Date: Tue, 30 Jul 2024 14:22:49 -0400 Subject: [PATCH 2/2] fix docs on make-credential --- passkey-types/src/ctap2/make_credential.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/passkey-types/src/ctap2/make_credential.rs b/passkey-types/src/ctap2/make_credential.rs index 7928da3..9f79625 100644 --- a/passkey-types/src/ctap2/make_credential.rs +++ b/passkey-types/src/ctap2/make_credential.rs @@ -5,8 +5,11 @@ use serde::{Deserialize, Serialize}; use crate::{ctap2::AuthenticatorData, webauthn, Bytes}; #[cfg(doc)] -use crate::webauthn::{ - CollectedClientData, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, +use { + crate::webauthn::{ + CollectedClientData, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, + }, + ciborium::value::Value, }; use super::extensions::{AuthenticatorPrfInputs, AuthenticatorPrfMakeOutputs, HmacGetSecretInput};