Like DefinitelyTyped but generated from official OpenAPI and JSONSchema files.
Note: This is a brand new project and absolutely not ready for production.
- adding new types is as easy as making one change to one file pointing to an openapi or jsonschema remote file
- use dtslint to make sure we are generating valid TypeScript types
- be friendly to opensource contributions and (ultimately) a place where people can add schemas for all kinds of things
- to NOT generate or accept types for things that already have 1st party types (e.g. slack has both OpenAPI and TypeScript offered 1st party)
- autopilot. For things like the kubernetes specs (maybe others) other projects like this have failed in the past because invariably they fall out of use. It must be as easy as running the CI, which will search for and generate new versions. That way, a process can be established where the CI will run periodically (say, daily or weekly) so no human intervention is needed for new types to be generated for new API versions.
- get types that we can use in
openapi-2-kong
andinsomnia
to generate Kong configs and things
- generating usable TypeScript types for (possibly) every release
- allow a mechanism for people to use this package to generate types for their own CRDs (and publish them here or not)
- create TypeScript types from jsonschema or openapi from Kong configs
- create TypeScript types that will work for transforming Postman configs to Insomnia configs (and vice versa! users come first.)
yarn install
before all else to download dependencies
yarn generate
to generate TypeScript types. See./global.d.ts
for options.yarn delete:generated
to delete TypeScript typesyarn build
to generate and compile everythingyarn delete:build
to clean files from the build
- Parser used: https://github.com/touchifyapp/spec2ts
- kube-openapi the code that generates the kubernetes OpenAPI specs
- a pull request on the current state of Kubernetes OpenAPI v3
- the latest Kubernetes OpenAPI spec
- what seems like the most recent k8s schemas