From 5721ecaba699c02752f7ed4e5f58886072754424 Mon Sep 17 00:00:00 2001 From: Pavel Roskin <1317472+proski@users.noreply.github.com> Date: Thu, 30 Jan 2025 09:43:32 -0800 Subject: [PATCH] Fix documentation for the `import_types` macro (#758) --- README.md | 4 ++-- typify-macro/src/lib.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cde7fb03..6201e6d4 100644 --- a/README.md +++ b/README.md @@ -144,8 +144,8 @@ For the macro: ```rust typify::import_types!( schema = "schema.json", - unknown_types = Allow, - crates { + unknown_crates = Allow, + crates = { "oxnet" = "1.0.0" } ) diff --git a/typify-macro/src/lib.rs b/typify-macro/src/lib.rs index 3262c1ac..8401fdf5 100644 --- a/typify-macro/src/lib.rs +++ b/typify-macro/src/lib.rs @@ -40,10 +40,10 @@ mod token_utils; /// /// - `unknown_crates`: optional policy regarding the handling of schemas that /// contain the `x-rust-type` extension whose crates are not explicitly named -/// in the `crates` section. The options are `generate` to ignore the -/// extension and generate a *de novo* type, `allow` to use the named type +/// in the `crates` section. The options are `Generate` to ignore the +/// extension and generate a *de novo* type, `Allow` to use the named type /// (which may require the addition of a new dependency to compile, and which -/// ignores version compatibility checks), or `deny` to produce a +/// ignores version compatibility checks), or `Deny` to produce a /// compile-time error (requiring the user to specify the crate's disposition /// in the `crates` section). ///