This package can be used to transform your openapi specs (json or yaml) to be used in the ADP1 apim repo
Project description
adp-api-converter
A utility to transform your OpenAPI specifications (JSON or YAML) for use in the ADP1 APIM repository.
This tool ensures your API specs have required attributes and outputs a modified OpenAPI JSON file.
Features
- Accepts OpenAPI specs in
.json,.yaml, or.ymlformats. - Adds missing
operationIdandsummaryfields to operations. - Ensures the
info.titlefield is set to a template value. - Outputs the modified spec as formatted JSON.
Usage
You can run the converter as a command-line tool:
adp-api-converter <input_file> [output_file]
<input_file>: Path to your OpenAPI spec (YAML or JSON).[output_file]: (Optional) Path for the output JSON file. Defaults toopenapi.json.
Example
adp-api-converter api.yaml modified_api.json
How it works
- Loads the OpenAPI spec from the provided file.
- Adds or updates the following:
info.titleis set to{{apiTitle}}.- Each operation gets an
operationId(if missing) in the format:<method>_<path>-{consumerphase}. - Each operation gets a
summary(if missing) in the format:<METHOD> <path>.
- Saves the modified spec as JSON.
Requirements
- Python 3.9+
- pyyaml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adp_api_transformeer-0.0.2.tar.gz.
File metadata
- Download URL: adp_api_transformeer-0.0.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d3072404fae21069c2310607ce2d5d24e57bd16f4bd694d58bed63a29751efa
|
|
| MD5 |
8447f1551c213d65fe79b5bcf05fe616
|
|
| BLAKE2b-256 |
2db69eb21a08959f23f5294148e8f3885fc65d12f6271be992d63e3809aa6dd1
|
File details
Details for the file adp_api_transformeer-0.0.2-py3-none-any.whl.
File metadata
- Download URL: adp_api_transformeer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b45c1026880544859cd4b4c83a55de16a03e2a89fab0cf2dc42e055da261d0f
|
|
| MD5 |
452cd09b752f644cf08a385e080fcb91
|
|
| BLAKE2b-256 |
9cda8ad757812039c7bde53c2a2be1f5a7ea6608da04bf7ce98bcb1b4b2d6a6a
|