Community development of provider functionality is key to stackql
and our mission.
Here, we describe the process to develop, test and integrate a new provider from zero to General Availability.
We include an example integration for a simple Provider, publicapis
.
- Create a Provider definition document.
- Create at least one Service definition document.
- Run
stackql
with config to support local Provider development. - Iterate and verify that
stackql
works as expected against your new provider. - Submit a Pull Request against the Provider Registry repository.
This is a yaml or json document which contains Provider metadata and reference(s) to any Service document(s) through which it will expose functionality.
Example as per examples/registry/src/publicapis/v1/provider.yaml.
This is an openapi document spec in either yaml or json format, plus a legal annotation components.x-stackQL-resources
, which defines the Resource portion of the stackql
heirarchy.
Example as per examples/registry/src/publicapis/v1/services/api-v1.yaml.
Configure stackql
to use your docs, via the --registry
command line argument. The example integration section expands upon this.
Iterate upon steps 2 and 3 until API coverage and functionality fulfill your requirements.
As per the Provider Registry Contributor Guide. The team will review as rapidly as possible and work with you to complete the integration. Once this is done, your functionality with be available via registry pull...
In this walkthrough, we demonstrate the bare bones of integrating a simple Provider,
publicapis
, which is included here within source control.
The assumptions for this walkthrough are:
- You have either built (eg: as per the readme) or copied the
stackql
executable for your platform into the build directory. - The current working directory is same as this document, otherwise relative paths to
pwd
will need to be adjusted.
Registry access config:
PROVIDER_REGISTRY_ROOT_DIR="$(pwd)/../examples/registry"
REG_STR='{ "url": "file://'${PROVIDER_REGISTRY_ROOT_DIR}'", "localDocRoot": "'${PROVIDER_REGISTRY_ROOT_DIR}'", "verifyConfig": {"nopVerify": true } }'
Provider auth config as per developer guide:
AUTH_STR='{ "publicapis": { "type": "null_auth" } }'
$(pwd)/../build/stackql --auth="${AUTH_STR}" --registry="${REG_STR}" exec "select API from publicapis.api.apis where API like 'Dog%' limit 10;"
$(pwd)/../build/stackql --auth="${AUTH_STR}" --registry="${REG_STR}" exec "select API from publicapis.api.random where title = 'Dog';"
## The single, anonmyous column returned from selecing an array of strings is a core issue to fix separate to this
$(pwd)/../build/stackql --auth="${AUTH_STR}" --registry="${REG_STR}" exec "select * from publicapis.api.categories limit 5;"