File tree Expand file tree Collapse file tree 2 files changed +37
-5
lines changed Expand file tree Collapse file tree 2 files changed +37
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,22 @@ OpenAPI Type
24
24
25
25
OpenAPI specification represented as a Python type. Use it to parse specifications written in JSON and YAML formats.
26
26
27
+ .. code :: bash
28
+
29
+ pip install openapi-type
30
+
31
+
32
+ .. code :: python
33
+
34
+ from openapi_type import OpenAPI, parse_spec, serialize_spec
35
+
36
+
37
+ spec: OpenAPI = parse_spec({
38
+ " your OpenAPI Spec as Python dictionary" : " will be parsed into a proper Python type"
39
+ })
40
+ assert parse_spec(serialize_spec(spec)) == spec
41
+
42
+
27
43
Cloning this repo
28
44
-----------------
29
45
@@ -52,9 +68,9 @@ Test framework
52
68
53
69
Run existing test suite with
54
70
55
- .. code ::
71
+ .. code :: bash
56
72
57
- $ nix-shell --run "make test"
73
+ nix-shell --run " make test"
58
74
59
75
60
76
Changelog
Original file line number Diff line number Diff line change 3
3
You can adapt this file completely to your liking, but it should at least
4
4
contain the root `toctree` directive.
5
5
6
- OpenAPI Client Generator for Python
7
- ===================================
6
+ OpenAPI Type for Python
7
+ =======================
8
+
9
+ **openapi-type ** provides the `OpenAPI Specification <https://github.com/OAI/OpenAPI-Specification >`_ as a Python type.
10
+
11
+ .. code-block :: bash
12
+
13
+ pip install openapi-type
14
+
15
+
16
+ .. code-block :: python
17
+
18
+ from openapi_type import OpenAPI, parse_spec, serialize_spec
19
+
20
+
21
+ spec: OpenAPI = parse_spec({
22
+ " your OpenAPI Spec as Python dictionary" : " will be parsed into a proper Python type"
23
+ })
24
+ assert parse_spec(serialize_spec(spec)) == spec
8
25
9
- **openapi-type **
10
26
11
27
Quickstart Guide
12
28
================
You can’t perform that action at this time.
0 commit comments