1.1.2 • Published 2 months ago

fastify-openapi-connector-generator v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Fastify OpenAPI Connector Generator

Companion package to fastify-openapi-connector usable both programatically and with npx.

fastify-openapi-connector is minimum dependency package, therefore generator has been split into it's own (this) package.

Usage

Use npx:

npx fastify-openapi-generator <options>

Or import the generator usual way and programatically, everything is exported so you can also just pick bits and pieces.

Options

Required

  • --schema-file
    • Path to schema file generated by openapi-typescript.
  • --types-file
    • Path to where types file should be generated.
  • --service-file
    • Path to where service file should be generated.
  • --spec-file
    • Path to OpenAPI spec file

Optional

  • --help
    • Display this
  • --paths-dir
    • Directory to generate route handlers from paths section of OAS.
  • --webhooks-dir
    • Directory to generate route handlers from webhooks section of OAS.
  • --security-dir
    • Directory to generate security handlers.
  • --untyped
    • Indicates that generated handlers should be untyped.
  • --override-types-file
    • Indicates that types file should be overrided if exists.

Example

npx fastify-openapi-connector-generator \
  --schema-file=./src/generated/schema.ts \
  --types-file=./src/generated/types.ts \
  --service-file=./src/generated/service.ts \
  --paths-dir=./src/paths \
  --webhooks-dir=./src/webhooks \
  --security-dir=./src/security \
  --spec-file=./spec.yaml \
  --override-types-file
1.1.1

2 months ago

1.1.2

2 months ago

1.0.2

3 months ago

1.0.1

3 months ago

1.0.3

3 months ago

1.0.0

4 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago