Releases: hasura/ndc-open-api-lambda
v1.0.0
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v1.0.0
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v1.0.0/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v1.0.0/changelog.md
v0.2.0
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.2.0
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.2.0/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.2.0/changelog.md
v0.1.5
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.1.5
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.5/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.5/changelog.md
v0.1.4
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.1.4
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.4/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.4/changelog.md
v0.1.3
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.1.3
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.3/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.3/changelog.md
v0.1.2
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.1.2
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.2/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.2/changelog.md
v0.1.1
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.1.1
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.1/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.1/changelog.md
v0.1.0
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.1.0
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.0/README.md
Changelog
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.1.0/changelog.md
v0.0.2-alpha
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.0.2-alpha
Readme
https://github.com/hasura/ndc-open-api-lambda/blob/release/v0.0.2-alpha/README.md
Changelog
v0.0.1-alpha
v0.0.1-alpha
Initial release of the NDC Open API Connector.
Docker Image
ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha
Readme
Changelog
- Generate Typescript API from an Open API document/swagger file
- Generate wrapper functions that become the data source for TS Lambda Connector on the generated Typescript API
Usage
You can use the connector via the published Docker Image. The Docker Image expects the following environment variables:
NDC_OAS_DOCUMENT_URI
: The URI to your Open API Document. If you're using a file instead of a HTTP link, please ensure that it is namedswagger.json
and is present in the root directory of the volume being mounted to/etc/connector
. This env var is nullable.NDC_OAS_BASE_URL
: The base URL of your API. This env var is nullable.NDC_OAS_HEADERS
: Headers to be added to your API calls. The expected syntax iskey1=value1&key2=value2&key3=value3....
. This env var is nullable.NDC_OAS_FILE_OVERWRITE
: Boolean flag to allow previously generated files to be over-written. Defaults tofalse
. Please note that the codegen will fail with an error if this is set tofalse
and the files that the codegen would create already exist.HASURA_PLUGIN_LOG_LEVEL
: The log level. Possible values:trace
,debug
,info
,warn
,error
,fatal
,panic
. Defaults toinfo
NDC_OAS_LAMBDA_PRETTY_LOGS
: Boolean flag to print human readable logs instead of JSON
The Docker Image will output the generated files at /etc/connector
. Please ensure that a volume mount is present at that directory in while using the docker run
command
NOTE: The Docker Image uses the NDC Open API Lambda Connector CLI internally, so -h
on any command will print the help for that command. Also, env vars can be substituted with CLI flags passed to the docker run
command
Examples
# get command documentation/help
docker run --rm ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha update -h
# run the code generation (using env vars)
docker run --rm -v ./:/etc/connector/ -e NDC_OAS_DOCUMENT_URI=${url to open API document} ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha update
# run the code generation (using CLI flags)
docker run --rm -v ./:/etc/connector/ ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha update --open-api ${url to open API document}
# with headers (using env vars)
docker run --rm -v ./:/etc/connector/ -e NDC_OAS_DOCUMENT_URI=${url to open API document} -e NDC_OAS_HEADERS=${key1=value1&key2=value2&key3=value3...} ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha update
# with headers (using CLI flags)
docker run --rm -v ./:/etc/connector/ ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha update --open-api ${url to open API document} -H key1=value1 -H key2=value2 -H key3=value3
# with baseUrl (using env vars)
docker run --rm -v ./:/etc/connector/ -e NDC_OAS_DOCUMENT_URI=${url to open API document} -e NDC_OAS_BASE_URL=http://demoapi.com/ ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha update
# with baseUrl (using CLI flags)
docker run --rm -v ./:/etc/connector/ ghcr.io/hasura/ndc-open-api-lambda:v0.0.1-alpha update --open-api ${url to open API document} --base-url http://demoapi.com/