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

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

generate stackql provider for Linode from openapi specs
https://github.com/stackql/stackql-provider-linode

linode stackql stackql-provider

Last synced: 3 months ago
JSON representation

generate stackql provider for Linode from openapi specs

Awesome Lists containing this project

README

          

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

This repository is used to generate and document the `linode` provider for StackQL, allowing you to query and manipulate Linode 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 Linode provider with StackQL, you'll need:

1. A Linode account with appropriate API credentials
2. A Linode API token 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 Linode API OpenAPI specification:

```bash
rm provider-dev/downloaded/*
curl -L https://github.com/linode/linode-api-docs/raw/refs/heads/development/openapi.json \
-o provider-dev/downloaded/openapi.json

# pre process the spec to remove the apiVersion path param
python3 provider-dev/scripts/remove_api_version.py
```

## 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 linode \
--api-doc provider-dev/downloaded/openapi_api_version_removed.json \
--svc-discriminator path \
--output-dir provider-dev/source \
--overwrite \
--svc-name-overrides "$(cat <