Skip to content

docs: Rework the documentation - #451

Merged
Kriskras99 merged 3 commits into
mainfrom
feat/documentation
Feb 4, 2026
Merged

Kriskras99 merged 3 commits into
mainfrom
feat/documentation

Conversation

@Kriskras99

@Kriskras99 Kriskras99 commented Feb 1, 2026 •

Copy link
Copy Markdown
Contributor

The first page of our documentation was overwhelmingly large. This commit moves the documentation to several places:

  • The introduction to Avro itself was moved to documentation::primer
  • Using the crate the "Avro" way was moved to documentation::generic
    • I've also changed the focus to the fact that it allows for more dynamic code
  • Using the crate the "Serde" way was moved to serde
  • Calculating schema fingerprints was moved to Schema::fingerprint
    • Users can easily find it by searching for fingerprint
  • Custom name validators was moved to validator
    • Can be found via search and listed under the modules on the first page
  • Custom schema equality was moved to schema_equality
    • Can be found via search and listed under the modules on the first page It also removes some sections
  • How to install the library and enable features, this is basic Rust knowledge
  • Section about breaking changes in minor versions, this is to be expected as the crate is at 0.*
  • Reading and writing logical types, this was a very large section but not very useful
  • Ill formed data, instead the error message was improved by adding a link to the function to change the limit

This also adds documentation for the AvroSchema derive (on the trait) and updates the derive crate documentation to link to it.

In addition, I've enabled some Clippy lints related to documentation and fixed all the lints it caused.

Future work:

  • Enable the clippy.missing_errors_doc and clippy.missing_panics_doc lints
  • Deprecate some types that live in the root namespace
    • For example, the codec related types. Instead the codec module should be public
    • This will further improve the signal to noise ratio on the first page

@Kriskras99
Kriskras99 marked this pull request as draft February 1, 2026 22:05
@Kriskras99
Kriskras99 force-pushed the feat/documentation branch 2 times, most recently from dc07230 to b1f461c Compare February 2, 2026 07:45
Comment thread avro/src/schema/mod.rs Resolved
Comment thread avro/src/documentation/primer.rs Resolved
Comment thread avro/src/documentation/primer.rs Resolved
Comment thread avro/src/documentation/dynamic.rs Resolved
Comment thread avro/src/documentation/dynamic.rs Resolved
Comment thread avro/src/serde/derive.rs Resolved
Comment thread avro/src/schema_compatibility.rs Resolved
Comment thread avro/src/serde/mod.rs Resolved
Comment thread avro_derive/src/lib.rs Resolved
Comment thread avro_derive/src/lib.rs Resolved
[The first page of our documentation](https://docs.rs/apache-avro/0.21.0/apache_avro/) was
overwhelmingly large. This commit moves the documentation to several places:
 - The introduction to Avro itself was moved to `documentation::primer`
 - Using the crate the "Avro" way was moved to `documentation::generic`
   - I've also changed the focus to the fact that it allows for more dynamic code
 - Using the crate the "Serde" way was moved to `serde`
 - Calculating schema fingerprints was moved to `Schema::fingerprint`
   - Users can easily find it by searching for fingerprint
 - Custom name validators was moved to `validator`
   - Can be found via search and listed under the modules on the first page
 - Custom schema equality was moved to `schema_equality`
   - Can be found via search and listed under the modules on the first page
It also removes some sections
 - How to install the library and enable features, this is basic Rust knowledge
 - Section about breaking changes in minor versions, this is to be expected as the crate is at `0.*`
 - Reading and writing logical types, this was a very large section but not very useful
 - Ill formed data, instead the error message was improved by adding a link to the function to change the limit

In addition, I've enabled some Clippy lints related to documentation and fixed all the lints
it caused.

Future work:
 - Enable the `clippy.missing_errors_doc` and `clippy.missing_panics_doc` lints
 - Deprecate some types that live in the root namespace
   - For example, the codec related types. Instead the `codec` module should be public
   - This will further improve the signal to noise ratio on the first page
@Kriskras99
Kriskras99 marked this pull request as ready for review February 4, 2026 07:51
@Kriskras99

Copy link
Copy Markdown
Contributor Author

@martin-g I think this is ready to merge, there are probably still grammatical issues and sentences that can be slightly improved but we can fix those when we notice them.

@Kriskras99
Kriskras99 merged commit 98d419e into main Feb 4, 2026
23 checks passed
@Kriskras99
Kriskras99 deleted the feat/documentation branch February 4, 2026 08:50
@martin-g martin-g added this to the 0.22.0 milestone Feb 18, 2026
@Kriskras99 Kriskras99 mentioned this pull request Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants