Generates TypeScript clients for Atlassian products from OpenAPI specs and fixes typing issues.
It is recommended to copy paste the whole tooling into your monorepo. The use of the generated classes and typings is most comfortable via workspaces, which are also avilable for pnpm and yarn.
Updates are possible on several levels:
- Update the OpenAPI generator in the
openapitools.jsonwith the newest release - Download the
swagger.jsonfiles from Atlassian again withnpm run fetch - Update the URLs to the
swagger.jsonfiles on Atlassian servers for newest rest API version. The URLs are documented from Atlassian: Cloud, Server.
All steps require to generate all files from the specs again with npm run gen.
The swagger.json is used to generate TypeScript files via OpenApi Generator CLI.
The generated code is then fixed against serious typing errors, which probably result from bad specs in the swagger.json files.
All fixes are made with jscodeshift.
All codemods are located in the gen-tool directory for each product separately.
Each product generates a separate subproject inside the generated-code directory and is type checked with tsc.