UNPKG

@trumbitta/nx-plugin-openapi

Version:

[![NPM Version](https://badge.fury.io/js/%40trumbitta%2Fnx-plugin-openapi.svg)](https://www.npmjs.com/@trumbitta/nx-plugin-openapi) [![License](https://img.shields.io/npm/l/@trumbitta/nx-plugin-openapi)]()

96 lines (95 loc) 3.5 kB
{ "$schema": "http://json-schema.org/schema", "cli": "nx", "id": "api-lib", "title": "Create a lib to generate sources from an OpenAPI specification file", "type": "object", "properties": { "name": { "type": "string", "description": "", "$default": { "$source": "argv", "index": 0 }, "x-prompt": "What name would you like to use?", "pattern": "^[a-zA-Z]{1}.*$" }, "useDockerBuild": { "type": "boolean", "description": "Should the build occur inside of a docker container", "default": false, "x-prompt": "Should the build occur inside of a docker container?" }, "generator": { "type": "string", "description": "The generator this lib will use to build an API SDK (e.g.: typescript-fetch)", "alias": "g", "x-prompt": "Which OpenAPITool generator would you like to use? (https://github.com/OpenAPITools/openapi-generator)", "default": "typescript-fetch" }, "tags": { "type": "string", "description": "Add tags to the project (used for linting)", "alias": "t" }, "directory": { "type": "string", "description": "A directory where the project is placed", "alias": "d" }, "importPath": { "type": "string", "description": "The library name used to import it, like @myorg/my-awesome-lib" }, "isRemoteSpec": { "type": "boolean", "description": "", "alias": "r", "x-prompt": "Is the API spec file published online?", "default": false }, "sourceSpecUrl": { "type": "string", "description": "The URL of the remote API spec file (Ex: https://petstore.swagger.io/v2/swagger.json)", "alias": "u", "x-prompt": "If it's online, what's the URL where I can get the API spec file from?" }, "sourceSpecUrlAuthorizationHeaders": { "type": "string", "description": "A URL-encoded string of name:header with a comma separating multiple values", "alias": "a", "x-prompt": "If it's online, which authorization headers do you need to add?" }, "sourceSpecLib": { "type": "string", "description": "The workspace lib where the source OpenAPI spec file is located at (Ex: api-spec)", "alias": "l", "x-prompt": "If it's local, what's the name of the lib containing the API spec file?" }, "sourceSpecFileRelativePath": { "type": "string", "description": "The name of the source OpenAPI spec file, and its path relative to the root of the `sourceSpecLib` project (Ex: src/api-spec.openapi.yml)", "alias": "f", "x-prompt": "If it's local, what's the path of the API spec file starting from the lib root?" }, "additionalProperties": { "type": "string", "description": "Additional properties for the generator", "x-prompt": "Do you want to specify any additional properties for the generator? key1=value1,key2=value2 (https://openapi-generator.tech/docs/generators)", "default": "" }, "globalProperties": { "type": "string", "description": "Global properties for the generator", "x-prompt": "Do you want to specify any global properties for the generator? key1=value1,key2=value2 (https://openapi-generator.tech/docs/globals)", "default": "" }, "skipFormat": { "description": "Skip formatting files.", "type": "boolean", "default": false } }, "required": ["name"] }