@rxap/plugin-open-api
v20.2.1-dev.3
Published
This plugin provides generators and executors for generating code from OpenAPI specifications within an Nx workspace. It allows you to initialize libraries, generate code for Angular and NestJS, and copy OpenAPI SDKs. The plugin simplifies the process of
Readme
This plugin provides generators and executors for generating code from OpenAPI specifications within an Nx workspace. It allows you to initialize libraries, generate code for Angular and NestJS, and copy OpenAPI SDKs. The plugin simplifies the process of integrating OpenAPI definitions into your projects.
Installation
Add the package to your workspace:
yarn add @rxap/plugin-open-apiExecute the init generator:
yarn nx g @rxap/plugin-open-api:initGenerators
generate
generate generator
nx g @rxap/plugin-open-api:generateinit-library
init-library generator
nx g @rxap/plugin-open-api:init-libraryOption | Type | Default | Description --- | --- | --- | --- project | string | | The name of the library project to initialize. external | boolean | false | Whether the OpenAPI specification is located outside the workspace. skipFormat | boolean | false | Whether to skip formatting generated files. persistent | boolean | false | Whether to make the initialization changes persistent.
init
Initialize the package in the workspace
nx g @rxap/plugin-open-api:initOption | Type | Default | Description --- | --- | --- | --- project | string | | The name of the project. projects | array | | A list of projects to initialize. skipFormat | boolean | false | Whether to skip formatting generated files. overwrite | boolean | false | Whether to overwrite existing files. skipProjects | boolean | false | Whether to skip executing project-specific initialization logic.
Executors
copy-open-api-sdk
copy-open-api-sdk executor
Option | Type | Default | Description --- | --- | --- | --- clientSdkProject | string | | The name of the client SDK project to copy angular | boolean | | Whether to copy the files for an Angular project nestjs | boolean | | Whether to copy the files for a NestJS project outputDir | string | openapi | The directory to copy the files to skipDirectives | boolean | | Whether to skip copying the directives skipDataSources | boolean | | Whether to skip copying the data sources skipRemoteMethods | boolean | | Whether to skip copying the remote methods
generate
generate executor
Option | Type | Default | Description --- | --- | --- | --- properties | | | required | | |
