An open API service indexing awesome lists of open source software.

https://github.com/stackql/stackql-provider-datadog

generate stackql provider for Datadog from openapi specs
https://github.com/stackql/stackql-provider-datadog

datadog stackql stackql-provider

Last synced: 3 months ago
JSON representation

generate stackql provider for Datadog from openapi specs

Awesome Lists containing this project

README

          

# `datadog` provider for [`stackql`](https://github.com/stackql/stackql)

This repository is used to generate and document the `datadog` provider for StackQL, allowing you to query and manipulate DataDog resources using SQL-like syntax. The provider is built using the `@stackql/provider-utils` package, which provides tools for converting OpenAPI specifications into StackQL-compatible provider schemas.

## Prerequisites

To use the DataDog provider with StackQL, you'll need:

1. A DataDog account with appropriate API credentials
2. DataDog API and Application keys with sufficient permissions for the resources you want to access
3. StackQL CLI installed on your system (see [StackQL](https://github.com/stackql/stackql))

## 1. Download the Open API Specification

First, download the DataDog API OpenAPI specification:

```bash
rm -rf provider-dev/downloaded/*
curl -L https://raw.githubusercontent.com/DataDog/datadog-api-client-typescript/refs/heads/master/.generator/schemas/v2/openapi.yaml \
-o provider-dev/downloaded/openapi.yaml
```

## 2. Split into Service Specs

Next, split the monolithic OpenAPI specification into service-specific files:

```bash
rm -rf provider-dev/source/*
npm run split -- \
--provider-name datadog \
--api-doc provider-dev/downloaded/openapi.yaml \
--svc-discriminator path \
--output-dir provider-dev/source \
--overwrite \
--svc-name-overrides "$(cat <