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_transformeer-0.0.2.tar.gz (3.5 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_transformeer-0.0.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for adp_api_transformeer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0d3072404fae21069c2310607ce2d5d24e57bd16f4bd694d58bed63a29751efa
MD5 8447f1551c213d65fe79b5bcf05fe616
BLAKE2b-256 2db69eb21a08959f23f5294148e8f3885fc65d12f6271be992d63e3809aa6dd1

See more details on using hashes here.

File details

Details for the file adp_api_transformeer-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for adp_api_transformeer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b45c1026880544859cd4b4c83a55de16a03e2a89fab0cf2dc42e055da261d0f
MD5 452cd09b752f644cf08a385e080fcb91
BLAKE2b-256 9cda8ad757812039c7bde53c2a2be1f5a7ea6608da04bf7ce98bcb1b4b2d6a6a

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