OpenAPI Components Schemas to Markdown
The goal of this package is to generate Github Flavored Markdown documentation of Components Schemas from the OpenAPI 3 specification.
Say you've got a YAML file:
openapi: "3.0.0"
info:
version: "0"
title: Demo
paths:
/demo:
get:
summary: Demo
responses:
'200':
description: OK
components:
schemas:
ResultatHumain:
properties:
operation_id:
type: integer
format: int64
description: Le numéro unique de l'opération
example: 1119920371
categorie_personne:
type: string
description: Indique la catégorie de personne impliquée dans le bilan humain
example: Pêcheur français
resultat_humain:
type: string
description: Description du bilan humain
example: Personne secourue
nombre:
type: number
format: int32
minimum: 0
description: Nombre de personnes impliquées dans ce bilan
example: 3
dont_nombre_blesse:
type: number
format: int32
minimum: 0
description: Indique le nombre de personnes blessées dans le bilan
example: 1
The package will produce a Markdown file from the YAML specification file with the following content:
## ResultatHumain
|Field|Type|Description|Example|Properties|
|---|---|---|---|---|
|operation_id|integer($int64)|Le numéro unique de l'opération|1119920371||
|categorie_personne|string|Indique la catégorie de personne impliquée dans le bilan humain|Pêcheur français||
|resultat_humain|string|Description du bilan humain|Personne secourue||
|nombre|number($int32)|Nombre de personnes impliquées dans ce bilan|3|minimum: 0|
|dont_nombre_blesse|number($int32)|Indique le nombre de personnes blessées dans le bilan|1|minimum: 0|
And if you render it:
ResultatHumain
| Field | Type | Description | Example | Properties |
|---|---|---|---|---|
| operation_id | integer($int64) | Le numéro unique de l'opération | 1119920371 | |
| categorie_personne | string | Indique la catégorie de personne impliquée dans le bilan humain | Pêcheur français | |
| resultat_humain | string | Description du bilan humain | Personne secourue | |
| nombre | number($int32) | Nombre de personnes impliquées dans ce bilan | 3 | minimum: 0 |
| dont_nombre_blesse | number($int32) | Indique le nombre de personnes blessées dans le bilan | 1 | minimum: 0 |
Installation
pip install open-api-schemas-to-markdown
Usage
The package provides a command line tool.
$ oa-to-md -h
usage: oa-to-md [-h] input_filepath output_filepath [locale]
positional arguments:
input_filepath The OpenAPI 3 YAML filepath
output_filepath The desired output filepath of the Markdown file
locale Locale to use when generating the Markdown file. Available:
en, fr
optional arguments:
-h, --help show this help message and exit
Example:
oa-to-md open_api.yml documentation.md
Notice
This software is available under the MIT license and was developed as part of the Entrepreneur d'Intérêt Général program by the French government.
Projet développé dans le cadre du programme « Entrepreneur d’intérêt général ».
Metadata
Release files for open-api-schemas-to-markdown 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| open_api_schemas_to_markdown-0.3.tar.gz | 4.4 kB | Without provenance | Details for open_api_schemas_to_markdown-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| open_api_schemas_to_markdown-0.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for open_api_schemas_to_markdown-0.3-py2.py3-none-any.whl |
Total release size: 9.8 kB
Release files / open_api_schemas_to_markdown-0.3.tar.gz
| Download URL | open_api_schemas_to_markdown-0.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b62186db8b14a75c0489440d3f6ad16320a892277491433bcd8d202139c867fc
|
|
BLAKE2b-256 checksum How to use checksums |
69e061425177950d50829d5666f94b11ff9b311db75ffe8cc56243fae42e7514
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.10
|
Release files / open_api_schemas_to_markdown-0.3-py2.py3-none-any.whl
| Download URL | open_api_schemas_to_markdown-0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5a46c48bb721e717196ad115655b8c5cf518d12ee6fd1273d5af1006f8cf5580
|
|
BLAKE2b-256 checksum How to use checksums |
f8ce8c02bfa64e622ff1c7cb0d7889e1aeb77e7abba4bbc5aa1a706e5d01a2e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/2.7.10
|
Security for open-api-schemas-to-markdown 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.