Skip to main content

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 .yml formats.
  • Adds missing operationId and summary fields to operations.
  • Ensures the info.title field 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 to openapi.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.title is 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adp_api_transformer-1.0.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adp_api_transformer-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file adp_api_transformer-1.0.0.tar.gz.

File metadata

  • Download URL: adp_api_transformer-1.0.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for adp_api_transformer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2a9a84763e5422e693679bfca674c524b186e9f35529f68de629fae7dd24300f
MD5 e69ce2a19763b180d30029115dc12081
BLAKE2b-256 c3cfc4fa55c00c2104dcacd0d9291cdbf8cc3fe93c454ddc005657fe0623520d

See more details on using hashes here.

File details

Details for the file adp_api_transformer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for adp_api_transformer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cef73b947c62a29ed0ef6aa1177963798c503ca510dfc8eda2d2aa37f0a465b9
MD5 74d5f58c874cfc487c6da9657ddb9589
BLAKE2b-256 fe1ae9b06b0a8fd4b739802602c319a8718462fe99c9801a2f0c93d5ccbfe215

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page