Skip to content

Generator to build clients in ts/js for all Atlassian products from their OpenAPI specs

License

Notifications You must be signed in to change notification settings

GerroDen/atlassian-ts-client-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generates TypeScript clients for Atlassian products from OpenAPI specs and fixes typing issues.

Usage

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.

Updating

Updates are possible on several levels:

  • Update the OpenAPI generator in the openapitools.json with the newest release
  • Download the swagger.json files from Atlassian again with npm run fetch
  • Update the URLs to the swagger.json files 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.

How it works

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.

About

Generator to build clients in ts/js for all Atlassian products from their OpenAPI specs

Topics

Resources

License

Stars

Watchers

Forks