Plugins
OpenAPI
Plugin for OpenAPI code generation
@bjb-forge/nx-openapi-project
Installation
npx @bjb-forge/cli add @bjb-forge/nx-openapi-projectPlugin Options
{
"plugin": "@bjb-forge/nx-openapi-project/nx-plugin",
"options": {}
}| Option | Type | Description |
|---|---|---|
build.targetName | string | The name of the build target |
Inferred Targets
build
Generates client/server code from OpenAPI specifications using openapi-generator.
Condition: All projects containing a generator-config.yml or generator-config.yaml
Generators
openapi-project
Create an OpenAPI client project.
nx g @bjb-forge/nx-openapi-project:openapi-project [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory where the project is placed |
name | string | Yes | - | Project name |
specFilePath | string | No | openapi.yaml | Path to the OpenAPI specification file |
template | string | No | typescript-fetch | OpenAPI generator template to use |
outputDir | string | No | generated | Output directory for generated code |