Docs
Installโ
- npm
- yarn
- pnpm
npm install @basketry/typescript-docs
yarn add @basketry/typescript-docs
pnpm add @basketry/typescript-docs
Basic Usageโ
basketry.config.json
{
"source": "petstore.json",
"parser": "@basketry/openapi-3",
"generators": ["@basketry/typescript-docs"],
"output": "src"
}
File Structureโ
This generator will create an markdown file for each service defined by the source schema. Each file will contain a description of the service, its methods, their parameters, and all responses. All types referenced by the service will be included in the documentation. Some common types may be duplicated across multiple documentation files if they are used by multiple services.
my-project/
โโโ node_modules/
โโโ src/
โ โโโ v1/ <-- generated
โ โ โโโ pet-service.md <-- generated
โ โ โโโ types.ts
โ โโโ index.ts
โโโ .gitignore
โโโ basketry.config.json
โโโ package.json
โโโ petstore.json
โโโ README.md
Optionsโ
This generator depends on the @basketry/typescript
generator and all of their applied options will also apply to files emitted by this generator.
See:
@basketry/typescript
options
The @basketry/typescript-docs
generator does not accept any of its own options.