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

app oas2pdf

Create PDF documentation from OpenAPI schemas

1 unstable release

new 0.0.1 Jan 30, 2025

#75 in #typst

MIT/Apache

50KB
623 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

~73MB
~1M SLoC