spec2openapi 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spec2openapi-0.1.0/LICENSE +202 -0
- spec2openapi-0.1.0/NOTICE +2 -0
- spec2openapi-0.1.0/PKG-INFO +209 -0
- spec2openapi-0.1.0/README.md +168 -0
- spec2openapi-0.1.0/pyproject.toml +64 -0
- spec2openapi-0.1.0/setup.cfg +4 -0
- spec2openapi-0.1.0/src/spec2openapi/__init__.py +55 -0
- spec2openapi-0.1.0/src/spec2openapi/bridge.py +478 -0
- spec2openapi-0.1.0/src/spec2openapi/cli.py +330 -0
- spec2openapi-0.1.0/src/spec2openapi/convert.py +62 -0
- spec2openapi-0.1.0/src/spec2openapi/openapi.py +234 -0
- spec2openapi-0.1.0/src/spec2openapi/parser.py +403 -0
- spec2openapi-0.1.0/src/spec2openapi/schema.py +398 -0
- spec2openapi-0.1.0/src/spec2openapi/server.py +85 -0
- spec2openapi-0.1.0/src/spec2openapi/swagger.py +430 -0
- spec2openapi-0.1.0/src/spec2openapi.egg-info/PKG-INFO +209 -0
- spec2openapi-0.1.0/src/spec2openapi.egg-info/SOURCES.txt +26 -0
- spec2openapi-0.1.0/src/spec2openapi.egg-info/dependency_links.txt +1 -0
- spec2openapi-0.1.0/src/spec2openapi.egg-info/entry_points.txt +2 -0
- spec2openapi-0.1.0/src/spec2openapi.egg-info/requires.txt +14 -0
- spec2openapi-0.1.0/src/spec2openapi.egg-info/top_level.txt +1 -0
- spec2openapi-0.1.0/tests/test_advanced.py +164 -0
- spec2openapi-0.1.0/tests/test_bridge.py +122 -0
- spec2openapi-0.1.0/tests/test_convert.py +102 -0
- spec2openapi-0.1.0/tests/test_e2e.py +85 -0
- spec2openapi-0.1.0/tests/test_fastmcp_compat.py +80 -0
- spec2openapi-0.1.0/tests/test_stress.py +177 -0
- spec2openapi-0.1.0/tests/test_swagger.py +177 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: spec2openapi
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Convert legacy API specs (SOAP/WSDL, Swagger 2.0) into FastMCP-ready OpenAPI 3.x documents
|
|
5
|
+
Author-email: Seoyul Yoon <devops.reso@gmail.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/Seo-yul/spec2openapi
|
|
8
|
+
Project-URL: Repository, https://github.com/Seo-yul/spec2openapi
|
|
9
|
+
Project-URL: Issues, https://github.com/Seo-yul/spec2openapi/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/Seo-yul/spec2openapi/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: wsdl,soap,swagger,openapi,mcp,fastmcp,converter,legacy,api
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
License-File: NOTICE
|
|
28
|
+
Requires-Dist: zeep>=4.2
|
|
29
|
+
Requires-Dist: lxml>=4.9
|
|
30
|
+
Requires-Dist: PyYAML>=6.0
|
|
31
|
+
Provides-Extra: mcp
|
|
32
|
+
Requires-Dist: fastmcp>=3.0; extra == "mcp"
|
|
33
|
+
Requires-Dist: httpx>=0.27; extra == "mcp"
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
37
|
+
Requires-Dist: fastmcp>=3.0; extra == "dev"
|
|
38
|
+
Requires-Dist: httpx>=0.27; extra == "dev"
|
|
39
|
+
Requires-Dist: openapi-spec-validator>=0.7; extra == "dev"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# spec2openapi
|
|
43
|
+
|
|
44
|
+
> Convert legacy API specifications — SOAP/WSDL and Swagger 2.0 — into **FastMCP-ready OpenAPI 3.x** documents.
|
|
45
|
+
|
|
46
|
+
[](https://github.com/Seo-yul/spec2openapi/actions/workflows/ci.yml)
|
|
47
|
+
[](https://pypi.org/project/spec2openapi/)
|
|
48
|
+
[](pyproject.toml)
|
|
49
|
+
[](LICENSE)
|
|
50
|
+
[](CODE_OF_CONDUCT.md)
|
|
51
|
+
|
|
52
|
+
[한국어 문서 (Korean README)](README.ko.md)
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
MCP (Model Context Protocol) tooling such as [FastMCP](https://gofastmcp.com) can turn an OpenAPI 3.x document into an MCP server automatically — but enterprises are full of services described only by WSDL or Swagger 2.0. `spec2openapi` closes that gap:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
WSDL ─────────┐
|
|
60
|
+
├──(spec2openapi)──> OpenAPI 3.x (+ x-soap extensions) ──> FastMCP.from_openapi() ──> MCP tools
|
|
61
|
+
Swagger 2.0 ──┘
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The output is a single, ordinary OpenAPI document. It is designed for a **fixed-runtime deployment model**: build one FastMCP-based container image, then swap the spec (e.g. a Kubernetes ConfigMap) to mass-produce MCP servers without rebuilding anything.
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
- **WSDL → OpenAPI 3.0/3.1** — document/literal and rpc/literal bindings, SOAP 1.1/1.2, nested complex types, arrays, attributes, `nillable`, inheritance (flattened `complexContent` extensions), `simpleContent` (text value + attributes), `choice` (members become optional + `x-soap-choice`), default values, recursive types, multi-service/multi-port WSDLs with automatic dedup.
|
|
69
|
+
- **XSD facets & docs carried into tool schemas** — enumerations, `pattern`, length and numeric bounds, `fractionDigits` (→ `multipleOf`), and `xsd:annotation` documentation are extracted (including from `xsd:import`-ed schemas) so LLMs see well-described, well-constrained tool arguments.
|
|
70
|
+
- **`x-soap` contract** — SOAPAction, SOAP version, endpoint, wrapper element QNames, `soap:header` parts and declared faults are embedded as vendor extensions; OpenAPI `xml` annotations carry everything a call layer needs to serialize JSON ↔ literal XML.
|
|
71
|
+
- **Swagger 2.0 → OpenAPI 3.x upgrade** — full mechanical mapping (servers, requestBody, formData/multipart, parameter schema wrapping, `collectionFormat` → `style`/`explode`, `$ref` rewriting, security schemes, `type: file`, `x-nullable`, discriminator). Every assumption made for missing information is recorded in `x-s2o.assumptions`; untranslatable constructs are preserved as `x-` extensions and listed in `x-s2o.lossy`.
|
|
72
|
+
- **FastMCP compatibility, guaranteed and verifiable** — operationIds are generated in FastMCP's tool-name alphabet (`[A-Za-z0-9_]`, unique, ≤64 chars) so *tool name == operationId*. `spec2openapi validate` proves it: static checks, `openapi-spec-validator`, and a real `FastMCP.from_openapi()` round-trip listing the resulting tools.
|
|
73
|
+
- **Reference MCP runtime (optional)** — `pip install "spec2openapi[mcp]"` adds a verified SOAP bridge (custom httpx transport) + FastMCP glue, a fixed Dockerfile, and Kubernetes examples. SOAP faults map to MCP tool errors; plain REST specs are served by the same runtime.
|
|
74
|
+
|
|
75
|
+
## Installation
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install spec2openapi # converter only (zeep, lxml, PyYAML)
|
|
79
|
+
pip install "spec2openapi[mcp]" # + reference MCP runtime (fastmcp, httpx)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Quick start
|
|
83
|
+
|
|
84
|
+
### CLI
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# See what a WSDL contains (operations, headers, faults, style)
|
|
88
|
+
spec2openapi inspect https://legacy-host/OrderService?wsdl
|
|
89
|
+
|
|
90
|
+
# WSDL -> OpenAPI
|
|
91
|
+
spec2openapi convert https://legacy-host/OrderService?wsdl -o orders.openapi.yaml
|
|
92
|
+
|
|
93
|
+
# Swagger 2.0 -> OpenAPI 3.x (assumptions reported on stderr)
|
|
94
|
+
spec2openapi upgrade swagger2.json -o service.openapi.yaml
|
|
95
|
+
|
|
96
|
+
# Prove the spec converts cleanly into MCP tools
|
|
97
|
+
spec2openapi validate orders.openapi.yaml
|
|
98
|
+
|
|
99
|
+
# Reference MCP runtime (requires the [mcp] extra)
|
|
100
|
+
spec2openapi serve orders.openapi.yaml --transport http --port 8000
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
$ spec2openapi validate orders.openapi.yaml
|
|
105
|
+
operations : 2
|
|
106
|
+
component schemas : 3
|
|
107
|
+
openapi-spec-validator: OK
|
|
108
|
+
FastMCP round-trip: OK (2 tools)
|
|
109
|
+
- CreateOrder(customer, items, note)
|
|
110
|
+
- GetOrder(orderId)
|
|
111
|
+
|
|
112
|
+
OK: spec is FastMCP-convertible
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Library
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import spec2openapi
|
|
119
|
+
|
|
120
|
+
# WSDL -> OpenAPI dict
|
|
121
|
+
spec = spec2openapi.convert_wsdl("https://legacy-host/OrderService?wsdl")
|
|
122
|
+
|
|
123
|
+
# Swagger 2.0 -> OpenAPI dict
|
|
124
|
+
legacy = spec2openapi.load_spec("swagger2.json")
|
|
125
|
+
spec = spec2openapi.convert_swagger(legacy, openapi_version="3.1")
|
|
126
|
+
|
|
127
|
+
print(spec2openapi.dump_spec(spec)) # YAML text
|
|
128
|
+
|
|
129
|
+
# Optional [mcp] extra: run it as an MCP server right away
|
|
130
|
+
mcp = spec2openapi.from_openapi_spec(spec)
|
|
131
|
+
mcp.run(transport="http", host="0.0.0.0", port=8000)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## How SOAP calls work (the `x-soap` contract)
|
|
135
|
+
|
|
136
|
+
The generated paths (`/operations/...`) are *not* real REST endpoints — a SOAP translation layer must build the actual call. Everything it needs ships inside the spec:
|
|
137
|
+
|
|
138
|
+
| Field (`paths.*.post.x-soap`) | Meaning |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `operation` / `service` / `port` | WSDL names |
|
|
141
|
+
| `soapAction`, `soapVersion`, `style` | `"1.1"`/`"1.2"`, `document`/`rpc` |
|
|
142
|
+
| `endpoint` | `soap:address` (override at runtime) |
|
|
143
|
+
| `input` / `output` | wrapper element QNames |
|
|
144
|
+
| `headers[]` | `soap:header` parts with schema refs |
|
|
145
|
+
| `faults[]` | declared faults with schema refs |
|
|
146
|
+
|
|
147
|
+
Serialization rules (schema `xml` annotations): `xml.name`/`xml.namespace` (absent namespace = unqualified), `xml.attribute: true`, `xml.x-text: true` (simpleContent text), arrays repeat the element, and **property order = XSD sequence order** (do not alphabetize the document). `x-soap-choice` lists mutually exclusive property groups.
|
|
148
|
+
|
|
149
|
+
The `[mcp]` extra contains a verified implementation of this contract (`src/spec2openapi/bridge.py`) — use it directly or as the reference for your own runtime.
|
|
150
|
+
|
|
151
|
+
## Handling missing information (Swagger 2.0)
|
|
152
|
+
|
|
153
|
+
Upgrading is favorable: OpenAPI 3.x is a superset of Swagger 2.0, so almost nothing must be invented. Where documents are genuinely underspecified, a three-tier policy applies:
|
|
154
|
+
|
|
155
|
+
1. **Deterministic, documented defaults** — missing `consumes`/`produces` → `application/json`; missing `operationId` → `{method}_{path}`; missing `host` → relative server `/`; missing `schemes` → `https`. All recorded in `x-s2o.assumptions`.
|
|
156
|
+
2. **Preserve, never drop** — constructs with no OpenAPI 3 equivalent (e.g. `collectionFormat: tsv`) are kept as `x-` extensions and listed in `x-s2o.lossy`.
|
|
157
|
+
3. **Verify the outcome** — `spec2openapi validate` runs the actual FastMCP round-trip; assumptions never block tool generation because tools only need paths and schemas.
|
|
158
|
+
|
|
159
|
+
## Kubernetes: one image, many MCP servers
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
docker build -t spec2openapi:0.1.0 .
|
|
163
|
+
spec2openapi convert <wsdl> -o openapi.yaml
|
|
164
|
+
kubectl create configmap my-mcp-spec --from-file=openapi.yaml
|
|
165
|
+
kubectl apply -f k8s/example.yaml # Deployment mounts /config/openapi.yaml
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Only the ConfigMap changes per service; credentials live in a Secret (`SPEC2OPENAPI_ENDPOINT`, `SPEC2OPENAPI_AUTH` = `basic`|`wsse`, `SPEC2OPENAPI_USERNAME`/`PASSWORD`, `SPEC2OPENAPI_TIMEOUT`, `SPEC2OPENAPI_VERIFY`, `SPEC2OPENAPI_TRUST_ENV`). The MCP endpoint is `http://<service>:8000/mcp` (streamable HTTP).
|
|
169
|
+
|
|
170
|
+
## Limitations
|
|
171
|
+
|
|
172
|
+
rpc/encoded (skipped and recorded in `x-soap.skippedOperations`), MTOM/attachments, WS-Policy/WS-Addressing, and substitution groups are not supported. WS-Security support in the reference runtime is UsernameToken (PasswordText).
|
|
173
|
+
|
|
174
|
+
## Security
|
|
175
|
+
|
|
176
|
+
All XML parsing disables DTD loading, entity resolution, and parser-level network access. When converting WSDLs from **untrusted sources**, add `--forbid-external` (CLI) or `forbid_external=True` (API) to refuse fetching remote `wsdl:`/`xsd:` imports (SSRF mitigation; local relative imports still work). See [SECURITY.md](SECURITY.md) for the full notes and how to report vulnerabilities.
|
|
177
|
+
|
|
178
|
+
## Development
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
git clone https://github.com/Seo-yul/spec2openapi.git
|
|
182
|
+
cd spec2openapi
|
|
183
|
+
pip install -e ".[dev]"
|
|
184
|
+
python -m pytest tests/
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The suite (70 tests) covers conversion units, the Swagger upgrader, envelope (de)serialization, end-to-end MCP-tool-call → mock-SOAP-server round-trips (rpc, simpleContent, choice, recursive trees, unqualified forms), FastMCP round-trips for every fixture × OpenAPI 3.0/3.1, and stress patterns (circular `$ref`s, deep nesting, large enums, cross-namespace name collisions, duplicate operation names across services, odd path characters, deep `allOf` chains). Generated samples live in [`examples/`](examples/).
|
|
188
|
+
|
|
189
|
+
## Project layout
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
src/spec2openapi/
|
|
193
|
+
parser.py WSDL parsing (zeep) + raw XSD scraping (facets/docs)
|
|
194
|
+
schema.py XSD -> JSON Schema (xml annotations, choice, simpleContent)
|
|
195
|
+
openapi.py OpenAPI 3.0/3.1 assembly + x-soap extensions
|
|
196
|
+
swagger.py Swagger 2.0 -> OpenAPI 3.x upgrader (x-s2o report)
|
|
197
|
+
convert.py core public API
|
|
198
|
+
cli.py convert / upgrade / inspect / validate / serve
|
|
199
|
+
bridge.py [mcp] SOAP bridge (httpx transport)
|
|
200
|
+
server.py [mcp] FastMCP glue
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Contributing
|
|
204
|
+
|
|
205
|
+
Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md); by participating you agree to uphold it. Security issues should be reported privately per [SECURITY.md](SECURITY.md).
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
[Apache-2.0](LICENSE) © Seoyul Yoon
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# spec2openapi
|
|
2
|
+
|
|
3
|
+
> Convert legacy API specifications — SOAP/WSDL and Swagger 2.0 — into **FastMCP-ready OpenAPI 3.x** documents.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/Seo-yul/spec2openapi/actions/workflows/ci.yml)
|
|
6
|
+
[](https://pypi.org/project/spec2openapi/)
|
|
7
|
+
[](pyproject.toml)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](CODE_OF_CONDUCT.md)
|
|
10
|
+
|
|
11
|
+
[한국어 문서 (Korean README)](README.ko.md)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
MCP (Model Context Protocol) tooling such as [FastMCP](https://gofastmcp.com) can turn an OpenAPI 3.x document into an MCP server automatically — but enterprises are full of services described only by WSDL or Swagger 2.0. `spec2openapi` closes that gap:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
WSDL ─────────┐
|
|
19
|
+
├──(spec2openapi)──> OpenAPI 3.x (+ x-soap extensions) ──> FastMCP.from_openapi() ──> MCP tools
|
|
20
|
+
Swagger 2.0 ──┘
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The output is a single, ordinary OpenAPI document. It is designed for a **fixed-runtime deployment model**: build one FastMCP-based container image, then swap the spec (e.g. a Kubernetes ConfigMap) to mass-produce MCP servers without rebuilding anything.
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
- **WSDL → OpenAPI 3.0/3.1** — document/literal and rpc/literal bindings, SOAP 1.1/1.2, nested complex types, arrays, attributes, `nillable`, inheritance (flattened `complexContent` extensions), `simpleContent` (text value + attributes), `choice` (members become optional + `x-soap-choice`), default values, recursive types, multi-service/multi-port WSDLs with automatic dedup.
|
|
28
|
+
- **XSD facets & docs carried into tool schemas** — enumerations, `pattern`, length and numeric bounds, `fractionDigits` (→ `multipleOf`), and `xsd:annotation` documentation are extracted (including from `xsd:import`-ed schemas) so LLMs see well-described, well-constrained tool arguments.
|
|
29
|
+
- **`x-soap` contract** — SOAPAction, SOAP version, endpoint, wrapper element QNames, `soap:header` parts and declared faults are embedded as vendor extensions; OpenAPI `xml` annotations carry everything a call layer needs to serialize JSON ↔ literal XML.
|
|
30
|
+
- **Swagger 2.0 → OpenAPI 3.x upgrade** — full mechanical mapping (servers, requestBody, formData/multipart, parameter schema wrapping, `collectionFormat` → `style`/`explode`, `$ref` rewriting, security schemes, `type: file`, `x-nullable`, discriminator). Every assumption made for missing information is recorded in `x-s2o.assumptions`; untranslatable constructs are preserved as `x-` extensions and listed in `x-s2o.lossy`.
|
|
31
|
+
- **FastMCP compatibility, guaranteed and verifiable** — operationIds are generated in FastMCP's tool-name alphabet (`[A-Za-z0-9_]`, unique, ≤64 chars) so *tool name == operationId*. `spec2openapi validate` proves it: static checks, `openapi-spec-validator`, and a real `FastMCP.from_openapi()` round-trip listing the resulting tools.
|
|
32
|
+
- **Reference MCP runtime (optional)** — `pip install "spec2openapi[mcp]"` adds a verified SOAP bridge (custom httpx transport) + FastMCP glue, a fixed Dockerfile, and Kubernetes examples. SOAP faults map to MCP tool errors; plain REST specs are served by the same runtime.
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install spec2openapi # converter only (zeep, lxml, PyYAML)
|
|
38
|
+
pip install "spec2openapi[mcp]" # + reference MCP runtime (fastmcp, httpx)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
### CLI
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# See what a WSDL contains (operations, headers, faults, style)
|
|
47
|
+
spec2openapi inspect https://legacy-host/OrderService?wsdl
|
|
48
|
+
|
|
49
|
+
# WSDL -> OpenAPI
|
|
50
|
+
spec2openapi convert https://legacy-host/OrderService?wsdl -o orders.openapi.yaml
|
|
51
|
+
|
|
52
|
+
# Swagger 2.0 -> OpenAPI 3.x (assumptions reported on stderr)
|
|
53
|
+
spec2openapi upgrade swagger2.json -o service.openapi.yaml
|
|
54
|
+
|
|
55
|
+
# Prove the spec converts cleanly into MCP tools
|
|
56
|
+
spec2openapi validate orders.openapi.yaml
|
|
57
|
+
|
|
58
|
+
# Reference MCP runtime (requires the [mcp] extra)
|
|
59
|
+
spec2openapi serve orders.openapi.yaml --transport http --port 8000
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
$ spec2openapi validate orders.openapi.yaml
|
|
64
|
+
operations : 2
|
|
65
|
+
component schemas : 3
|
|
66
|
+
openapi-spec-validator: OK
|
|
67
|
+
FastMCP round-trip: OK (2 tools)
|
|
68
|
+
- CreateOrder(customer, items, note)
|
|
69
|
+
- GetOrder(orderId)
|
|
70
|
+
|
|
71
|
+
OK: spec is FastMCP-convertible
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Library
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
import spec2openapi
|
|
78
|
+
|
|
79
|
+
# WSDL -> OpenAPI dict
|
|
80
|
+
spec = spec2openapi.convert_wsdl("https://legacy-host/OrderService?wsdl")
|
|
81
|
+
|
|
82
|
+
# Swagger 2.0 -> OpenAPI dict
|
|
83
|
+
legacy = spec2openapi.load_spec("swagger2.json")
|
|
84
|
+
spec = spec2openapi.convert_swagger(legacy, openapi_version="3.1")
|
|
85
|
+
|
|
86
|
+
print(spec2openapi.dump_spec(spec)) # YAML text
|
|
87
|
+
|
|
88
|
+
# Optional [mcp] extra: run it as an MCP server right away
|
|
89
|
+
mcp = spec2openapi.from_openapi_spec(spec)
|
|
90
|
+
mcp.run(transport="http", host="0.0.0.0", port=8000)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## How SOAP calls work (the `x-soap` contract)
|
|
94
|
+
|
|
95
|
+
The generated paths (`/operations/...`) are *not* real REST endpoints — a SOAP translation layer must build the actual call. Everything it needs ships inside the spec:
|
|
96
|
+
|
|
97
|
+
| Field (`paths.*.post.x-soap`) | Meaning |
|
|
98
|
+
|---|---|
|
|
99
|
+
| `operation` / `service` / `port` | WSDL names |
|
|
100
|
+
| `soapAction`, `soapVersion`, `style` | `"1.1"`/`"1.2"`, `document`/`rpc` |
|
|
101
|
+
| `endpoint` | `soap:address` (override at runtime) |
|
|
102
|
+
| `input` / `output` | wrapper element QNames |
|
|
103
|
+
| `headers[]` | `soap:header` parts with schema refs |
|
|
104
|
+
| `faults[]` | declared faults with schema refs |
|
|
105
|
+
|
|
106
|
+
Serialization rules (schema `xml` annotations): `xml.name`/`xml.namespace` (absent namespace = unqualified), `xml.attribute: true`, `xml.x-text: true` (simpleContent text), arrays repeat the element, and **property order = XSD sequence order** (do not alphabetize the document). `x-soap-choice` lists mutually exclusive property groups.
|
|
107
|
+
|
|
108
|
+
The `[mcp]` extra contains a verified implementation of this contract (`src/spec2openapi/bridge.py`) — use it directly or as the reference for your own runtime.
|
|
109
|
+
|
|
110
|
+
## Handling missing information (Swagger 2.0)
|
|
111
|
+
|
|
112
|
+
Upgrading is favorable: OpenAPI 3.x is a superset of Swagger 2.0, so almost nothing must be invented. Where documents are genuinely underspecified, a three-tier policy applies:
|
|
113
|
+
|
|
114
|
+
1. **Deterministic, documented defaults** — missing `consumes`/`produces` → `application/json`; missing `operationId` → `{method}_{path}`; missing `host` → relative server `/`; missing `schemes` → `https`. All recorded in `x-s2o.assumptions`.
|
|
115
|
+
2. **Preserve, never drop** — constructs with no OpenAPI 3 equivalent (e.g. `collectionFormat: tsv`) are kept as `x-` extensions and listed in `x-s2o.lossy`.
|
|
116
|
+
3. **Verify the outcome** — `spec2openapi validate` runs the actual FastMCP round-trip; assumptions never block tool generation because tools only need paths and schemas.
|
|
117
|
+
|
|
118
|
+
## Kubernetes: one image, many MCP servers
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
docker build -t spec2openapi:0.1.0 .
|
|
122
|
+
spec2openapi convert <wsdl> -o openapi.yaml
|
|
123
|
+
kubectl create configmap my-mcp-spec --from-file=openapi.yaml
|
|
124
|
+
kubectl apply -f k8s/example.yaml # Deployment mounts /config/openapi.yaml
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Only the ConfigMap changes per service; credentials live in a Secret (`SPEC2OPENAPI_ENDPOINT`, `SPEC2OPENAPI_AUTH` = `basic`|`wsse`, `SPEC2OPENAPI_USERNAME`/`PASSWORD`, `SPEC2OPENAPI_TIMEOUT`, `SPEC2OPENAPI_VERIFY`, `SPEC2OPENAPI_TRUST_ENV`). The MCP endpoint is `http://<service>:8000/mcp` (streamable HTTP).
|
|
128
|
+
|
|
129
|
+
## Limitations
|
|
130
|
+
|
|
131
|
+
rpc/encoded (skipped and recorded in `x-soap.skippedOperations`), MTOM/attachments, WS-Policy/WS-Addressing, and substitution groups are not supported. WS-Security support in the reference runtime is UsernameToken (PasswordText).
|
|
132
|
+
|
|
133
|
+
## Security
|
|
134
|
+
|
|
135
|
+
All XML parsing disables DTD loading, entity resolution, and parser-level network access. When converting WSDLs from **untrusted sources**, add `--forbid-external` (CLI) or `forbid_external=True` (API) to refuse fetching remote `wsdl:`/`xsd:` imports (SSRF mitigation; local relative imports still work). See [SECURITY.md](SECURITY.md) for the full notes and how to report vulnerabilities.
|
|
136
|
+
|
|
137
|
+
## Development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git clone https://github.com/Seo-yul/spec2openapi.git
|
|
141
|
+
cd spec2openapi
|
|
142
|
+
pip install -e ".[dev]"
|
|
143
|
+
python -m pytest tests/
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The suite (70 tests) covers conversion units, the Swagger upgrader, envelope (de)serialization, end-to-end MCP-tool-call → mock-SOAP-server round-trips (rpc, simpleContent, choice, recursive trees, unqualified forms), FastMCP round-trips for every fixture × OpenAPI 3.0/3.1, and stress patterns (circular `$ref`s, deep nesting, large enums, cross-namespace name collisions, duplicate operation names across services, odd path characters, deep `allOf` chains). Generated samples live in [`examples/`](examples/).
|
|
147
|
+
|
|
148
|
+
## Project layout
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
src/spec2openapi/
|
|
152
|
+
parser.py WSDL parsing (zeep) + raw XSD scraping (facets/docs)
|
|
153
|
+
schema.py XSD -> JSON Schema (xml annotations, choice, simpleContent)
|
|
154
|
+
openapi.py OpenAPI 3.0/3.1 assembly + x-soap extensions
|
|
155
|
+
swagger.py Swagger 2.0 -> OpenAPI 3.x upgrader (x-s2o report)
|
|
156
|
+
convert.py core public API
|
|
157
|
+
cli.py convert / upgrade / inspect / validate / serve
|
|
158
|
+
bridge.py [mcp] SOAP bridge (httpx transport)
|
|
159
|
+
server.py [mcp] FastMCP glue
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Contributing
|
|
163
|
+
|
|
164
|
+
Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md); by participating you agree to uphold it. Security issues should be reported privately per [SECURITY.md](SECURITY.md).
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
[Apache-2.0](LICENSE) © Seoyul Yoon
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "spec2openapi"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Convert legacy API specs (SOAP/WSDL, Swagger 2.0) into FastMCP-ready OpenAPI 3.x documents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
|
+
authors = [{ name = "Seoyul Yoon", email = "devops.reso@gmail.com" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"wsdl", "soap", "swagger", "openapi", "mcp", "fastmcp",
|
|
15
|
+
"converter", "legacy", "api",
|
|
16
|
+
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: Apache Software License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Programming Language :: Python :: 3.13",
|
|
27
|
+
"Topic :: Software Development :: Code Generators",
|
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"zeep>=4.2",
|
|
33
|
+
"lxml>=4.9",
|
|
34
|
+
"PyYAML>=6.0",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.urls]
|
|
38
|
+
Homepage = "https://github.com/Seo-yul/spec2openapi"
|
|
39
|
+
Repository = "https://github.com/Seo-yul/spec2openapi"
|
|
40
|
+
Issues = "https://github.com/Seo-yul/spec2openapi/issues"
|
|
41
|
+
Changelog = "https://github.com/Seo-yul/spec2openapi/blob/main/CHANGELOG.md"
|
|
42
|
+
|
|
43
|
+
[project.optional-dependencies]
|
|
44
|
+
mcp = [
|
|
45
|
+
"fastmcp>=3.0",
|
|
46
|
+
"httpx>=0.27",
|
|
47
|
+
]
|
|
48
|
+
dev = [
|
|
49
|
+
"pytest>=8",
|
|
50
|
+
"pytest-asyncio>=0.23",
|
|
51
|
+
"fastmcp>=3.0",
|
|
52
|
+
"httpx>=0.27",
|
|
53
|
+
"openapi-spec-validator>=0.7",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[project.scripts]
|
|
57
|
+
spec2openapi = "spec2openapi.cli:main"
|
|
58
|
+
|
|
59
|
+
[tool.setuptools.packages.find]
|
|
60
|
+
where = ["src"]
|
|
61
|
+
|
|
62
|
+
[tool.pytest.ini_options]
|
|
63
|
+
asyncio_mode = "auto"
|
|
64
|
+
testpaths = ["tests"]
|