feat: generate and package OpenAPI clients
Use the openapi-generator CLI to generate and package a TypeScript client using axios for HTTP transport and a Python package using urllib3 for transport. The version numbers of the generated packages match the version number of the generated OpenAPI schema. As the OpenAPI generator is intended to be generic, we configure a reasonable set of defaults for generated artefact names, etc. Show how these can be customised in local configuration to specify alternate locations for schema files and source packages to be added as release assets. Add the generated API clients as release assets. The list of generated clients is supposed to be slightly opaque to the consuming project so that we may add additional clients over time. Should that prove troublesome, each client may be explicitly disabled by setting a generator-specific `..._DISABLED` variable. The package name is generated from the GitLab project name but can be overridden. We do so in our case since the project name ("api") is a little under-descriptive. As with generation, we support per-client overriding of the package name which we demonstrate with the Python package.
Loading