Skip to content

Repository files navigation

ravelry-openapi-specification

An OpenAPI 3.1 specification for the Ravelry API, generated from the official HTML documentation.

Swagger UI · ReDoc

Prerequisites

go install github.com/cxd309/simple-file-server@latest

Setup the Python environment with uv:

uv sync

Generate

Parse api_documentation.html and write docs/openapi.json:

make generate

Serve

Browse the spec locally, emulating the GitHub Pages URL structure:

make serve
# -> http://localhost:8081/ravelry-openapi-specification/swagger.html
# -> http://localhost:8081/ravelry-openapi-specification/redoc.html

Project structure

api_documentation.html  # source: Ravelry API HTML docs
main.py                 # entry point
ravelry/
    parser.py           # HTML -> structured data
    generator.py        # structured data -> OpenAPI 3.1 spec
docs/
    openapi.json        # generated output
    swagger.html        # Swagger UI
    redoc.html          # ReDoc

About

OpenAPI 3.1 specification for the Ravelry API, generated from the official HTML documentation

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages