The SpaceTraders API is documented using the OpenAPI Specification. This allows users to generate a client library for the API in many different languages. You can find the repository with our OpenAPI specification here.
We provide access to our API documentation through Stoplight Studio. This allows you to interact with the API directly from your browser and is synced with our OpenAPI specification.
Generating a Client Library
The OpenAPI specification can be used to generate a client library for the SpaceTraders API in many different languages using the OpenAPI Generator .
openapi-generator was installed using homebrew, but you can find installation instructions for your platform here.
openapi-generator generate \
-i https://stoplight.io/api/v1/projects/spacetraders/spacetraders/nodes/reference/SpaceTraders.json?fromExportButton=true&snapshotType=http_service&deref=optimizedBundle \
-o packages/spacetraders-sdk \
-g typescript-axios \
Our specification file uses the $ref keyword frequently to reference other files. This can cause issues with some OpenAPI generators.
However, Stoplight has a link for the bundled specification that can be used to generate a client library.