#schema #pdf #documentation #open-api #typst #template

app oas2pdf

Create PDF documentation from OpenAPI schemas

2 releases

0.0.2 Feb 3, 2025
0.0.1 Jan 30, 2025

#184 in Database interfaces

Download history 107/week @ 2025-01-27 127/week @ 2025-02-03 3/week @ 2025-02-10

237 downloads per month

MIT/Apache

51KB
665 lines

oas2pdf

Create PDF documentation from OpenAPI schemas!

Usage

Install with cargo install --locked --git https://github.com/sciguy16/oas2pdf, then run oas2pdf --help.

To convert a YAML schema to PDF, run e.g. oas2pdf schema.yaml or oas2pdf schema.yaml --out some-other-name.pdf.

Limitations

  • This has not been tested with a wide variety of schema files - if you have a schema that doesn't work with this tool then please file a PR to add it to the samples directory
  • This currently works by templating fields from the schema directly into a Typst template. As such, it is possible for malicious schemas to read arbitrary files from the filsystem. I don't think there's a mechanism for writing files or executing shell commands, but haven't fully confirmed this. As ever, it is inadvisable to run this on schema files from untrusted sources

Licence

This project is licenced under either of

Dependencies

~71MB
~1M SLoC