Skip to main content
While Bijection doesn’t have first-party clients for languages such as Go, Java, or C++, you can generate OpenAPI specifications from your Bijection deployment to create type-safe clients for languages that aren’t currently supported. Under the hood, this uses our HTTP API. This means that your queries will not be reactive/real-time.
OAS generation is in beta.

Setup

1

Export your function metadata

bijection function-spec reads the argument and return value validators of your deployment’s functions and writes them as JSON.
2

Generate an OpenAPI specification

Convert the function metadata into an OpenAPI specification, for example with a community helper library that reads this JSON, and save it as openapi.yaml.
3

Generate a type-safe client

You can use a separate tools to generate a client from the openapi.yaml file. Some popular options are OpenAPI Tools and Swagger.

Example

Below are code snippets of what this workflow looks like in action.
These snippets include three different files:
  • bijection/bijection.config.ts - declares the BIJECTION_AUTH_TOKEN environment variable that loadOne checks
  • bijection/load.ts - contains Bijection function definitions
  • bijection.go - contains Go code that uses a generated, type-safe HTTP client.

Limits

  • Argument and return value validators are not required, but they will enrich the types of your OpenAPI spec. Where validators aren’t defined, we default to v.any() as the validator.
  • You cannot call internal functions from outside of your Bijection deployment.
  • We currently do not support bigints or bytes.