Skip to main content

datacontract import openapi

Import a data contract from the response of a GET operation in an OpenAPI 3.x document.

datacontract import openapi [OPTIONS]
OptionDefaultDescription
--source—Path to the OpenAPI 3.x document (YAML or JSON).
--operation—The GET operation to import, by operationId or path (e.g. listOrders or /orders). Required when the document has more than one GET operation.
--output—File path where the Data Contract will be saved. If not provided, it will be printed to stdout.
--owner—The owner or team responsible for managing the data contract.
--id—The identifier for the data contract.
--debug / --no-debug—Enable debug logging
datacontract import openapi --source openapi.yaml --operation listOrders --output datacontract.yaml

Guide: Import: OpenAPI.