1.0.11 • Published 1 year ago

@creator.co/open-api-zod-comment-parser v1.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

OpenAPI Schema Generator

A tool to generate OpenAPI specifications from Zod schemas in TypeScript files.

Installation

You don't need to install the package globally. You can use npx to run the command directly.

Usage

To generate OpenAPI specifications, run:

npx openapi-schema-generator

This command will:

  1. Recursively find all types.ts files in the src directory.
  2. Extract Zod schemas from these files.
  3. Generate OpenAPI components and save them to ./docs/types.yaml.
  4. Parse OpenAPI comments from your codebase and save the full OpenAPI spec to ./docs/api.yaml.

Requirements

Ensure your project meets the following requirements:

  1. TypeScript files containing Zod schemas named types.ts.
  2. An .openapirc.js configuration file in the project root.

Configuration

The .openapirc.js file should export your OpenAPI configuration for openapi-comment-parser package.

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago