]> git.ipfire.org Git - thirdparty/patchwork.git/commit
docs: Make API document versioned
authorStephen Finucane <stephen@that.guru>
Fri, 26 Oct 2018 23:49:17 +0000 (00:49 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 22 Dec 2018 17:19:07 +0000 (17:19 +0000)
commit7a557ae9ea09f5d1d3801586336f2743fbc7ccea
tree565c23833f80c5c65f10651596a9518fdc60b233
parentee7d0f8bb87a32d7a32c06dc35cdd7b9fd3d1f77
docs: Make API document versioned

OpenAPI doesn't appear to support versioning natively, suggesting
instead that separate documents are kept. Rather than doing this
manually, let's use a templating tool - Jinja2, in this case - to
generate these document for us from a single master document.

Note that while we can now auto-generate these whenever we need them
(and we tend to avoid storing auto-generated assets in VCS), these
change so rarely that it's easier to just store them. This also means we
can reference the schemas themselves online. We do this in a following
change.

Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/api/schemas/generate_schema.py [new file with mode: 0644]
docs/api/schemas/patchwork.j2 [moved from docs/api/schemas/patchwork.yaml with 97% similarity]
docs/requirements.txt